diff --git a/libraries/ui-strings/src/main/res/values/strings_eax.xml b/libraries/ui-strings/src/main/res/values/strings_eax.xml new file mode 100644 index 0000000000..cc6160ce25 --- /dev/null +++ b/libraries/ui-strings/src/main/res/values/strings_eax.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/tools/danger/dangerfile.js b/tools/danger/dangerfile.js index ab6495b0c7..2098c96c97 100644 --- a/tools/danger/dangerfile.js +++ b/tools/danger/dangerfile.js @@ -74,6 +74,7 @@ const allowList = [ "fedrunov", "Florian14", "ganfra", + "github-actions[bot]", "jmartinesp", "jonnyandrew", "kittykat", @@ -116,8 +117,18 @@ if (github.requested_reviewers.users.length == 0 && !pr.draft) { } // Check that translations have not been modified by developers -if (user != "RiotTranslateBot") { +const translationAllowList = [ + "RiotTranslateBot", + "github-actions[bot]", +] + +if (!translationAllowList.includes(user)) { if (editedFiles.some(file => file.endsWith("strings.xml") && !file.endsWith("values/strings.xml"))) { - fail("Some translation files have been edited. Only user `RiotTranslateBot` (i.e. translations coming from Weblate) is allowed to do that.\nPlease read more about translations management [in the doc](https://github.com/vector-im/element-android/blob/develop/CONTRIBUTING.md#internationalisation).") + fail("Some translation files have been edited. Only user `RiotTranslateBot` (i.e. translations coming from Weblate) or `github-actions[bot]` (i.e. translations coming from automation) are allowed to do that.\nPlease read more about translations management [in the doc](https://github.com/vector-im/element-android/blob/develop/CONTRIBUTING.md#internationalisation).") + } + + // Check that new strings are not added to `values/strings.xml` + if (editedFiles.some(file => file.endsWith("ui-strings/src/main/res/values/strings.xml"))) { + fail("`ui-strings/src/main/res/values/strings.xml` has been edited. This file will be overridden in the next strings synchronisation. Please add new strings in the file `values/strings_eax.xml` instead.") } }