Chromium translation change

151 views
Skip to first unread message

paul poveda

unread,
Apr 23, 2021, 5:21:29 PM4/23/21
to Chromium-dev
Hello all,

I want to change the missing permission message in Chromium for Android, labelled "IDS_INFOBAR_MISSING_MICROPHONE_CAMERA_PERMISSIONS_TEXT".

I change this translation in "chrome/browser/ui/android/strings/android_chrome_strings.grd".

When I build the Chromium APK and test, I noticed this change break the translations for all language :
if I change my phone locale to  Spanish I got the "en-US" default translation of  IDS_INFOBAR_MISSING_MICROPHONE_CAMERA_PERMISSIONS_TEXT instead of the Spanish one contained in xtb file.

I see in Chromium documentation that android_chrome_strings.grd is a template used to generate a SHA1 id for other language translations.

How this problem could be fix ?

Thanks,

paul poveda

unread,
May 4, 2021, 4:56:31 PM5/4/21
to Chromium-dev, paul poveda
Hello,

Just for posterity, we found a solution about this issue concerning GRIT (translation tool used in Chromium) here.

What we want to do : generate the hash "id" for the translation we modified in the ".grd" file and report it in the translations files :

Example :

message to modify in ".grd" file :
<message name="IDS_AW_WEBPAGE_NOT_AVAILABLE" desc="Hint message to resolve passphrase required error"> Enter your passphrase to start sync</message>

Solution :

We generate a XMB file :

$ python ./tools/grit/grit.py -i YOUR_GRD_FILE xmb OUTPUT_XMB_FILE_PATH

<msg desc="Hint message to resolve passphrase required error." id="974555521953189084">
  Enter your passphrase to start sync
</msg>

Report this generated id from this xmb into translated files.
Reply all
Reply to author
Forward
0 new messages