субота, 9 вересня 2017 р. 20:25:22 EEST Paul Licameli написано: > From what little I know of languages, this question goes especially to > Chinese and Russian translators, but maybe it is also relevant to other > languages I know less about. > > I found a small gap in our translations. See the code below. "hour", > "hours", "minute", "minutes" did not get extracted to the .pot file. The > intention is to compose strings like "1 hour and 2 minutes" from > translations of pieces of the phrase. > > But I think it is better not to fix it by giving you four more little words > to translate. Rather, give a little more context. That is, make the > pieces to translate a little bigger: > > 1 hour > %d hours > 1 minute > %d minutes > > I am thinking, for instance, that good Chinese requires a "classifier" word > before "hours" or "minutes" -- but if I ask the Chinese translator just for > the word "hour" or "hours" out of context, I would be given a translation > without a classifier, and then assembling the pieces would not be good > Chinese. > > // Use wxPLURAL to get strings > > sHours = wxPLURAL("hour", "hours", iHours); > > sMins = wxPLURAL("minute", "minutes", iMins); > > > /* i18n-hint: A time in hours and minutes. Only translate the "and". */ > > sFormatted.Printf(_("%d %s and %d %s."), iHours, sHours, iMins, sMins); > > return sFormatted; > > Below is another example of a translated phrase assembled from pieces, but > without regard to other grammars. The word "of" with no context is a very > poor thing to present to translators. Better in this case, I think, that > the strings be > > 1 of 1 clip > %d of %d clips > > (and really the first isn't good English, perhaps it should be "sole clip") > > I am thinking of a language like Russian where "clips" above would properly > be translated into genitive plural case, but "clips" without context is > again a bad thing to present to the translator. The translator would > probably give me nominative plural when there is no context. > > wxString temp; > > temp.Printf(wxT("%d %s %d %s "), result.index + 1, _("of"), result. > waveTrack->GetNumClips(), > > result.waveTrack->GetNumClips() == 1 ? _("clip") : _("clips")); > > message += temp; > > Translators, can you name other examples like this? Are there other > examples of English strings in the .pot file that are single words out of > context, which gave you doubts and difficulties about the right answers? > > Paul Licameli
Hi, I see no problems with Slavic languages for such strings. And now it is easy to browse Audacity code to find the hints and answers when in doubt. For me, the bigger problem is the actual lack of true plural forms in strings like https://github.com/audacity/audacity/blob/master/src/import/ImportRaw.cpp#L402 chans.Add(wxString::Format(_("%d Channels"), i + 1)); Actually, there are many languages in the world with more than 2 plural forms and several Audacity strings ignore this (they can easily be found by searching "%d" in the POT-catalog). Best regards, Yuri Ukrainian translator ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Audacity-translation mailing list Audacity-translation@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/audacity-translation