From bf0b5e05ddaab7ea1a2eac96ff81546dc694d37d Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Mon, 30 Aug 2021 12:00:50 +0200 Subject: [PATCH 1/4] Update link to Weblate --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 5151a618f6..ec8868d6f9 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -116,7 +116,7 @@ You should consider adding Unit tests with your PR, and also integration tests ( ### Internationalisation -When adding new string resources, please only add new entries in file `value/strings.xml`. Translations will be added later by the community of translators with a specific tool named [Weblate](https://translate.riot.im/projects/riot-android/). +When adding new string resources, please only add new entries in file `value/strings.xml`. Translations will be added later by the community of translators with a dedicated tool named [Weblate](https://translate.element.io/projects/element-android/). Do not hesitate to use plurals when appropriate. ### Accessibility From 381fc75d7ea51cc7fe9ddb70ef466b7b2ebb759d Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Mon, 30 Aug 2021 12:15:42 +0200 Subject: [PATCH 2/4] Update instruction about string resources --- CONTRIBUTING.md | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index ec8868d6f9..10bba2b7e6 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -116,9 +116,34 @@ You should consider adding Unit tests with your PR, and also integration tests ( ### Internationalisation -When adding new string resources, please only add new entries in file `value/strings.xml`. Translations will be added later by the community of translators with a dedicated tool named [Weblate](https://translate.element.io/projects/element-android/). +Translations are handled using an external tool: [Weblate](https://translate.element.io/projects/element-android/) + +As a general rule, please never edit or add or remove translations to the project in a Pull Request. It can lead to merge conflict if the translations are also modified in Weblate side. + +#### Adding new string + +When adding new string resources, please only add new entries in file `value/strings.xml`. Translations will be added later by the community of translators using Weblate. + +New strings can be added anywhere in the file `value/strings.xml`, not necessarily at the end of the file. Generally, it's even better to add the new strings in some dedicated section per feature, and not at the end of the file, to avoid merge conflict between 2 PR adding strings at the end of the same file. + Do not hesitate to use plurals when appropriate. +#### Editing existing strings + +Two cases: +- If the meaning stays the same, it's OK to edit the original string (i.e. the English version). +- If the meaning is not the same, please create a new string and do not remove the existing string. See below for instructions to remove existing sting. + +#### Removing existing strings + +If a string is not used anymore, it should be removed from the resource, but please do not remove the strings or its translations in the PR. It can lead to merge conflict with Weblate, and to lint error if new translations from deleted strings are added with Weblate. + +Instead, please comment the original string with: +```xml + +``` +The string will be removed during the next sync with Weblate. + ### Accessibility Please consider accessibility as an important point. As a minimum requirement, in layout XML files please use attributes such as `android:contentDescription` and `android:importantForAccessibility`, and test with a screen reader if it's working well. You can add new string resources, dedicated to accessibility, in this case, please prefix theirs id with `a11y_`. From b6d36894752fad338ffe3ef0cc344442328fa3ca Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Mon, 30 Aug 2021 12:30:11 +0200 Subject: [PATCH 3/4] Fix warning as per #3901 --- .../vector/app/features/rageshake/BugReporterMultipartBody.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vector/src/main/java/im/vector/app/features/rageshake/BugReporterMultipartBody.java b/vector/src/main/java/im/vector/app/features/rageshake/BugReporterMultipartBody.java index 7a29bf12e4..a530b6e667 100755 --- a/vector/src/main/java/im/vector/app/features/rageshake/BugReporterMultipartBody.java +++ b/vector/src/main/java/im/vector/app/features/rageshake/BugReporterMultipartBody.java @@ -224,7 +224,7 @@ public class BugReporterMultipartBody extends RequestBody { } public static Part createFormData(String name, String value) { - return createFormData(name, null, RequestBody.create(null, value)); + return createFormData(name, null, RequestBody.create(value, null)); } public static Part createFormData(String name, String filename, RequestBody body) { From f8a20460ee8c0a2cfac422b47ab89dd9cd7775cf Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Mon, 30 Aug 2021 13:55:39 +0200 Subject: [PATCH 4/4] typo --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 10bba2b7e6..610a6227b7 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -132,7 +132,7 @@ Do not hesitate to use plurals when appropriate. Two cases: - If the meaning stays the same, it's OK to edit the original string (i.e. the English version). -- If the meaning is not the same, please create a new string and do not remove the existing string. See below for instructions to remove existing sting. +- If the meaning is not the same, please create a new string and do not remove the existing string. See below for instructions to remove existing string. #### Removing existing strings