Opened 15 years ago

Last modified 15 years ago

#991 assigned Defect

English-dependent word sequences in advanced prefs

Reported by: Nicolas Owned by: Nicolas
Priority: Undetermined Milestone: Undetermined
Component: Manager - Localization Version: 6.10.51
Keywords: Cc:

Description

As reported on the boinc_loc mailing list:

The following msgids constitute English-dependent word sequence:

#: clientgui/DlgAdvPreferencesBase.cpp:353
msgid "Transfer at most"
msgstr ""

#: clientgui/DlgAdvPreferencesBase.cpp:359
msgid "Mbytes"
msgstr ""

#: clientgui/DlgAdvPreferencesBase.cpp:362
msgid "every"
msgstr ""

#: clientgui/DlgAdvPreferencesBase.cpp:368
#: clientgui/DlgAdvPreferencesBase.cpp:382
msgid "days"
msgstr ""

#: clientgui/DlgAdvPreferencesBase.cpp:374
msgid "Connect about every"
msgstr ""

At least in Japanese, phrases that have similar meaning to "every 99 days", cannot be used in this fixed sequence of words:

"Transfer at most" <99> "M bytes" "every" <99> "days"

Sometimes Japanese translators can assign an irregular, twisted mapping between the msgids and the msgstrs that appear in a problematic sentence, that is, those words (msgid-msgstrs pairs) have permuted (non-word-by-word) mapping to mitigate this kind of issues. Then, of course this trick is deeply dependent of the context and very fragile to how these strings are used. In this case, unfortunately msgid "days" is used twice, so this kind of trick cannot be used here.

Change History (5)

comment:1 Changed 15 years ago by Nicolas

In the original report to the mailing list, JE2BWM suggested using different msgids for the two instances of "days" so they can be translated separately and he can use the trick swapping strings.

I think there is a better way: Use a single string like "Transfer at most %s every %s days", split into three strings using the '%s', and use those three strings for the labels.

This isn't really like replacing the %s with the textboxes, but translators can pretend it is. And poEdit and similar tools have special support for format specifiers, like saying if the translated string doesn't have them.

With this solution, it's still not possible to swap the 'MBytes' and 'days' textboxes, but at least it will be translatable as "Transfer %s maximum, every %s days", for example. Currently the only way to do that is to translate "every" as "maximum, every" which causes problems if "every" is used elsewhere.

I'll try to make a patch.

comment:2 Changed 15 years ago by Nicolas

Owner: changed from romw to Nicolas
Status: newassigned

comment:3 Changed 15 years ago by Nicolas

This is harder than I expected. The GUI is built as a table:

Maximum download rate KBytes/sec. Maximum upload rate KBytes/sec.
Transfer at mostMbyteseverydays
Connect about everydaysAdditional work bufferdays (max. 10)

Note that "Mbytes" and "every" are in separate cells, and visually quite far from each other. So I can't easily have my "Transfer at most %s MBytes every %s days". I need to split the string between "MBytes" and "every", which may not make sense in other languages (maybe the meaning of 'every' is already in the left-most side of the string).

I think I found a better way to lay out this UI, now I have to figure out how to do it in wxWidgets.

comment:4 Changed 15 years ago by Nicolas

My UI idea looks like this:

Connect about every  daysAdditional work buffer  days (max. 10)
Maximum download rate  KBytes/sec.Maximum upload rate  KBytes/sec.
Transfer at most 
 Mbytes every  days

The left column of text boxes is still aligned, but the "every [ ] days" text box just follows the flow of the sentence and isn't aligned with the right column. Having that layout in the middle of three rows would look weird, so I moved it to the bottom; and moved the "connect every" to the top so that download rate and transfer quota are adjacent. I also think "connect every" is more important (more likely users change it) than download rate.


The implementation would be:

Connect about every  days Additional work buffer days (max. 10)
Maximum download rate  KBytes/sec.Maximum upload rate  KBytes/sec.
Transfer at most 
 Mbytes every  days

which seems to be doable with wxGridBagSizer, but I haven't tried yet.

Comments?

comment:5 Changed 15 years ago by davea

Fine with me; it makes it clear that it's 1 pref rather than 2.

Note: See TracTickets for help on using tickets.