Multiple copies of fairly common strings, like "Learn more"

51 views
Skip to first unread message

dpapad

unread,
Jan 11, 2018, 5:25:30 PM1/11/18
to Chromium-dev, Lei Zhang, Jungshik Shin
Hi Chromium-dev,

There are some very common strings across the UI, for example "Ok", "Cancel",
"Learn more" (see here). I noticed that there were 20 copies of the same "Learn
more" string in various places of the UI, and made this CL to merge all of
these to the existing IDS_LEARN_MORE.

Are there any forseeable problems with doing so?

I know that in general identical English strings can be translated to different
strings on other languages, but is this a real concern for the already declared
common "Learn more" string? Note that none of the IDS_* entries being removed
had any special "meaning=" attribute attached to them.

Thank you,
Demetrios

Daniel Bratell

unread,
Jan 15, 2018, 10:09:32 AM1/15/18
to Chromium-dev, dpapad, Lei Zhang, Jungshik Shin
Looks like a good change. Wonder if something can be done to prevent there from being more of them in the future.

I suspect "Ok" might be a more difficult. It's a word that has many meanings and is context sensitive.

/Daniel - recalls a program where Exit was translated literally to a Swedish word meaning "door out".


--
/* Opera Software, Linköping, Sweden: CET (UTC+1) */

Peter Kasting

unread,
Jan 15, 2018, 12:16:03 PM1/15/18
to Daniel Bratell, Chromium-dev, dpapad, Lei Zhang, Jungshik Shin
On Mon, Jan 15, 2018 at 7:07 AM, Daniel Bratell <bra...@opera.com> wrote:
On Thu, 11 Jan 2018 23:25:30 +0100, dpapad <dpa...@chromium.org> wrote:

Hi Chromium-dev,

There are some very common strings across the UI, for example "Ok", "Cancel",
"Learn more" (see here). I noticed that there were 20 copies of the same "Learn
more" string in various places of the UI, and made this CL to merge all of
these to the existing IDS_LEARN_MORE.

Are there any forseeable problems with doing so?

I know that in general identical English strings can be translated to different
strings on other languages, but is this a real concern for the already declared
common "Learn more" string? Note that none of the IDS_* entries being removed
had any special "meaning=" attribute attached to them.

Looks like a good change. Wonder if something can be done to prevent there from being more of them in the future.

I suspect "Ok" might be a more difficult. It's a word that has many meanings and is context sensitive.

In general "OK" is a warning sign that your UI text probably needs changing -- we should have buttons with descriptive labels like "Save settings" rather than "OK".

So I would fix that case by reducing the number of "OK"s we have :)

I think the "Learn more" change is fine.

PK 

Albert Bodenhamer

unread,
Jan 18, 2018, 4:46:14 PM1/18/18
to Peter Kasting, Daniel Bratell, Chromium-dev, dpapad, Lei Zhang, Jungshik Shin
I would take a look at the translated strings as well. "Learn More" in 15 places in English might need to be translated differently in other languages depending on the context in which it is used.

I suspect this is a good change, but it pays to be careful. i18n is hard.

--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google Groups "Chromium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev+unsubscribe@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/CAAHOzFD1szYMk7KzgBeAGQQ7m6b13y%2BMBGA31wp465jazeeokw%40mail.gmail.com.



--
Albert Bodenhamer | Software Engineer | abodenha@chromium.org 

Matthew Menke

unread,
Jan 18, 2018, 8:42:14 PM1/18/18
to Chromium-dev, pkas...@chromium.org, bra...@opera.com, dpa...@chromium.org, the...@chromium.org, js...@chromium.org
My understanding is that translations are indexed by the hash of the original string, so identical English strings have a single corresponding entry in xtb files (And thus are necessarily all mapped to the same non-English string).
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev...@chromium.org.



--
Albert Bodenhamer | Software Engineer | abod...@chromium.org 

dpapad

unread,
Jan 19, 2018, 1:13:37 PM1/19/18
to Chromium-dev, pkas...@chromium.org, bra...@opera.com, dpa...@chromium.org, the...@chromium.org, js...@chromium.org


On Thursday, January 18, 2018 at 1:46:14 PM UTC-8, Albert Bodenhamer wrote:
I would take a look at the translated strings as well. "Learn More" in 15 places in English might need to be translated differently in other languages depending on the context in which it is used.

Where do I  find all translated strings? Are they under my out/ folder? Searched around for a bit, but could not spot them. Having said that, repeating my comment from the CL here.

If any translation is broken because of this, we can add the separate string back, with an appropriate "meaning=" attribute, but I doubt that we will end up adding back most of the 20 identical strings being removed.  So I am planning to land this CL, now that the branch cut has passed (and is already LGed).

Thanks

Albert Bodenhamer

unread,
Jan 19, 2018, 1:29:51 PM1/19/18
to Demetrios Papadopoulos, Chromium-dev, Peter Kasting, Daniel Bratell, Lei Zhang, Jungshik Shin
On Fri, Jan 19, 2018 at 10:13 AM, dpapad <dpa...@chromium.org> wrote:


On Thursday, January 18, 2018 at 1:46:14 PM UTC-8, Albert Bodenhamer wrote:
I would take a look at the translated strings as well. "Learn More" in 15 places in English might need to be translated differently in other languages depending on the context in which it is used.

Where do I  find all translated strings? Are they under my out/ folder? Searched around for a bit, but could not spot them. Having said that, repeating my comment from the CL here.

Depends on how the build rules are set up for each of the grds. The the translation console generates .xtb files which get checked in which contain the translated strings indexed by message ID. One xtb per grd per language.  For example, there's ash_strings.grd under ash/ and then a host of .xtb files checked into /ash/strings/.
 

If any translation is broken because of this, we can add the separate string back, with an appropriate "meaning=" attribute, but I doubt that we will end up adding back most of the 20 identical strings being removed.  So I am planning to land this CL, now that the branch cut has passed (and is already LGed).


Sounds like a reasonable approach.
 
Reply all
Reply to author
Forward
0 new messages