mirror of
https://github.com/KDE/kdeconnect-android
synced 2025-08-31 06:05:12 +00:00
Reorder placeholders for i18n c-format compatibility
Summary: Currently a2po exports files with a c-format tag, which means that plural forms "Failed receiving file from %2$s" are invalid for instance (it should be %1 to %n). Translations are subsequently blocked by the subversion pre-commit hooks. This fix reorders the placeholders. Reviewers: #kde_connect, eduisters Reviewed By: #kde_connect, eduisters Subscribers: kdeconnect Tags: #kde_connect Differential Revision: https://phabricator.kde.org/D17688
This commit is contained in:
@@ -142,12 +142,12 @@
|
||||
<item quantity="other">Sent %1$d out of %2$d files</item>
|
||||
</plurals>
|
||||
<plurals name="received_files_title">
|
||||
<item quantity="one">Received file from %2$s</item>
|
||||
<item quantity="other">Received %1$d files from %2$s</item>
|
||||
<item quantity="one">Received file from %1$s</item>
|
||||
<item quantity="other">Received %2$d files from %1$s</item>
|
||||
</plurals>
|
||||
<plurals name="received_files_fail_title">
|
||||
<item quantity="one">Failed receiving file from %3$s</item>
|
||||
<item quantity="other">Failed receiving %1$d of %2$d files from %3$s</item>
|
||||
<item quantity="one">Failed receiving file from %1$s</item>
|
||||
<item quantity="other">Failed receiving %2$d of %3$d files from %1$s</item>
|
||||
</plurals>
|
||||
<string name="received_file_text">Tap to open \'%1s\'</string>
|
||||
<string name="cannot_create_file">Cannot create file %s</string>
|
||||
|
@@ -513,7 +513,7 @@ public class SharePlugin extends Plugin implements ReceiveFileRunnable.CallBack
|
||||
|
||||
//TODO: Show error in notification
|
||||
int failedFiles = info.numberOfFiles() - (info.currentFileNumber - 1);
|
||||
shareNotification.setFinished(context.getResources().getQuantityString(R.plurals.received_files_fail_title, failedFiles, failedFiles, info.numberOfFiles(), device.getName()));
|
||||
shareNotification.setFinished(context.getResources().getQuantityString(R.plurals.received_files_fail_title, failedFiles, device.getName(), failedFiles, info.numberOfFiles()));
|
||||
shareNotification.show();
|
||||
shareNotification = null;
|
||||
currentShareInfo = null;
|
||||
@@ -532,7 +532,7 @@ public class SharePlugin extends Plugin implements ReceiveFileRunnable.CallBack
|
||||
|
||||
if (shareNotification != null) {
|
||||
//Update the notification and allow to open the file from it
|
||||
shareNotification.setFinished(context.getResources().getQuantityString(R.plurals.received_files_title, info.numberOfFiles(), info.numberOfFiles(), device.getName()));
|
||||
shareNotification.setFinished(context.getResources().getQuantityString(R.plurals.received_files_title, info.numberOfFiles(), device.getName(), info.numberOfFiles()));
|
||||
|
||||
if (info.numberOfFiles() == 1) {
|
||||
shareNotification.setURI(info.fileDocument.getUri(), info.fileDocument.getType(), info.fileName);
|
||||
|
Reference in New Issue
Block a user