Opened 4 months ago

Closed 7 days ago

#27125 closed defect (fixed)

Remove superfluous strings on tba-android_stringsdtd branch

Reported by: arthuredelstein Owned by: tbb-team
Priority: Medium Milestone:
Component: Community/Translations Version:
Severity: Normal Keywords: tbb-localization, TorBrowserTeam201812R
Cc: emmapeel Actual Points:
Parent ID: #26782 Points:
Reviewer: Sponsor:

Description

The current Tor Browser Android translation.git branch seems to contain all Fennec strings from https://hg.mozilla.org/mozilla-central/file/812e732d0928/mobile/android/base/locales/en-US/android_strings.dtd, which is unnecessary because these strings are already continuously updated and translated by Mozilla.

So we should remove
https://gitweb.torproject.org/translation.git/tree/en/android_strings.dtd?h=tba-android_stringsdtd

Probably most Tor Browser strings are shared between Desktop and Android. So we should not duplicate these either. We could introduce a .dtd for TBA-only strings. Or we could share .dtd and .properties files between Desktop and Android. Any strings only needed for Desktop can be ignored by Android and vice versa.

Child Tickets

Change History (15)

comment:1 Changed 5 weeks ago by emmapeel

I am not sure about all the implications, but if the strings are the same they are going to be repopulated from our translation memory, so that should not mean duplicating strings. Just saying.

comment:2 Changed 5 weeks ago by emmapeel

Parent ID: #26782

comment:3 Changed 3 weeks ago by sysrqb

Status: newneeds_review

Okay, please see my branch 27125. This branch moves the Tor Browser strings into our own file (mobile/android/base/locales/en-US/torbrowser_strings.dtd), and I reverted one change in android_strings.dtd because we don't use that string anymore.

https://gitweb.torproject.org/user/sysrqb/tor-browser.git/commit/?h=27125&id=ab0f83b95167374c851217df006652a91100c5ee

comment:4 Changed 3 weeks ago by gk

Keywords: TorBrowserTeam201811R added

comment:5 Changed 3 weeks ago by emmapeel

ok, so i will remove and forget forever (tm) the android_strings.dtd and start following the more pertinent torbrowser_strings.dtd, right?

I am confused because you want to 'fix things in android_strings.dtd'. shall i keep it?

comment:6 in reply to:  5 Changed 3 weeks ago by gk

Replying to emmapeel:

ok, so i will remove and forget forever (tm) the android_strings.dtd and start following the more pertinent torbrowser_strings.dtd, right?

I am confused because you want to 'fix things in android_strings.dtd'. shall i keep it?

No, that's not needed for translation. sysrqb only added a comment and reverted a(n used) string we changed in commit a8688422de1f25dd179edfba2473f5f5f659165a in that file. Both changes are nothing that needs to get translated.

comment:7 in reply to:  3 Changed 3 weeks ago by gk

Replying to sysrqb:

Okay, please see my branch 27125. This branch moves the Tor Browser strings into our own file (mobile/android/base/locales/en-US/torbrowser_strings.dtd), and I reverted one change in android_strings.dtd because we don't use that string anymore.

https://gitweb.torproject.org/user/sysrqb/tor-browser.git/commit/?h=27125&id=ab0f83b95167374c851217df006652a91100c5ee

Looks good to me. Applied to tor-browser60.3.0esr-8.5-1 (commit 970fcfe56478aa18fdeaf9ec902f016165dade62).

Last edited 3 weeks ago by gk (previous) (diff)

comment:8 Changed 3 weeks ago by gk

Component: Applications/Tor BrowserCommunity/Translations
Owner: changed from tbb-team to emmapeel
Status: needs_reviewassigned

comment:9 Changed 3 weeks ago by emmapeel

the resource is already available at our translation repo, branches tba-torbrowserstringsdtd and tba-torbrowserstringsdtd_completed

https://gitweb.torproject.org/translation.git/log/?h=tba-torbrowserstringsdtd

When it becomes part of master, I will hook it to update automatically.

We were able to reuse many translations from the tor browser onboarding, so there are partial translations for many languages already.

I wonder if it is really needed to escape the "'" character on https://gitweb.torproject.org/user/sysrqb/tor-browser.git/tree/mobile/android/base/locales/en-US/torbrowser_strings.dtd?h=27125&id=ab0f83b95167374c851217df006652a91100c5ee#n3 ? if it is needed, do the translations need to have chars escaped? which ones? what about utf-8?

Last edited 3 weeks ago by emmapeel (previous) (diff)

comment:10 Changed 3 weeks ago by emmapeel

Owner: changed from emmapeel to tbb-team

comment:11 Changed 3 weeks ago by gk

I don't think this is needed. We don't have this in our browser string either (althought they are in .properties and not .dtd files). I can give this a quick test and adjust the strings if needed.

comment:12 Changed 9 days ago by gk

Keywords: TorBrowserTeam201812R added; TorBrowserTeam201811R removed

Move review tickets to Decemeber.

comment:13 Changed 8 days ago by emmapeel

In general, the less we mindfuck the translators, the better the translations will result.

This escaping of the ' , for example, creates a set of doubts if you have a language very far from ASCII, because then you think: 'I cannot write normally, I need to escape each character' and stuff like that.

So if you want better translations, I would suggest to take this escaping character out, and always try to have the simplest of strings, regarding escaping, HTML tags, etc (and 'never concatenate strings' ofc). This is not urgent but I thought it may be pertinent :D

comment:14 in reply to:  11 Changed 7 days ago by gk

Replying to gk:

I don't think this is needed. We don't have this in our browser string either (althought they are in .properties and not .dtd files). I can give this a quick test and adjust the strings if needed.

I stand corrected. Without the backslash the build breaks. Here are some formatting rules: https://developer.android.com/guide/topics/resources/string-resource#FormattingAndStyling

comment:15 in reply to:  13 Changed 7 days ago by gk

Resolution: fixed
Status: assignedclosed

Replying to emmapeel:

In general, the less we mindfuck the translators, the better the translations will result.

This escaping of the ' , for example, creates a set of doubts if you have a language very far from ASCII, because then you think: 'I cannot write normally, I need to escape each character' and stuff like that.

So if you want better translations, I would suggest to take this escaping character out, and always try to have the simplest of strings, regarding escaping, HTML tags, etc (and 'never concatenate strings' ofc). This is not urgent but I thought it may be pertinent :D

Sounds like it would be worth filing a new bug for that and loop steph in. Currently the strings are aligned between mobile and desktop platforms. *If* we want to change them for ease of translation for mobile then we should change them for all platforms.

Note: See TracTickets for help on using tickets.