diff options
| author | Kalle Lindström <karl.lindstrom@mullvad.net> | 2025-05-20 17:45:00 +0200 |
|---|---|---|
| committer | Jonatan Rhodin <jonatan.rhodin@mullvad.net> | 2025-05-28 15:03:00 +0200 |
| commit | b5ef34f2949dd31e4d180d1f1be3730604483d9e (patch) | |
| tree | b988dfc739174b7d18c333ec5342028703409fba /android/scripts | |
| parent | e2aa463239400f4701823ca109901099b7555241 (diff) | |
| download | mullvadvpn-b5ef34f2949dd31e4d180d1f1be3730604483d9e.tar.xz mullvadvpn-b5ef34f2949dd31e4d180d1f1be3730604483d9e.zip | |
Fix arg order lost when adding to messages.pot
Currently when we add new strings from strings.xml in the android app
and these gets added to message.pot by the translation script the
arguments get added only as "%s" and "%d" and any ordering is lost. This
means that if you would add a string to the android app that is
something like "%1$s %2$s %1$s" this would be added to messages.pot as
msgid "%s %s %s" and it would treat it as the string has 3 different
arguments instead of 2.
This PR changes the code so that when the Android strings.xml strings
are added to messages.pot the argument index (if it exists) is not
removed as it was previously.
So the Android string "%1$s %2$s %1$s" will now result in the exact same
string being added to messages.pot.
However, the current normalizaion behavior is kept when it comes to
checking if an Android string already exists in messages.pot, so e.g.
the string `"Not all our servers are %1$s-enabled. Therefore, we use
multihop automatically to enable %1$s with any server."` will still
match the current value in the pot file which is: `"Not all our servers
are %(daita)s-enabled. Therefore, we use multihop automatically to
enable %(daita)s with any server."` and no new string is
added to messages.pot.
Diffstat (limited to 'android/scripts')
0 files changed, 0 insertions, 0 deletions
