GNOME Bugzilla – Bug 45245
Need to allow non-unique text in the search bar and search descriptions to be translated separately from other occurrences of the text
Last modified: 2004-12-22 21:47:04 UTC
This is part of splitting up bug 41971. This task involves getting around the problem that gettext assumes that strings with duplicate content should be translated only one. This is likely not the case for the text in the search bar and the search translations, as we are asking translators to translate part of a sentence. Darin suggested the workaround of preceding or proceeding each string that should specifically be translated separately by a character we will not use (eq ! or %) and then stripping the character before displaying. A comment should also be above the string in need of translation to explain why this was done to the translators. ------- Additional Comments From darin@bentspoon.com 2000-12-20 17:42:33 ---- Bug 45314 describes a way to change the US English version of search that would also have a side effect of making it translatable. ------- Additional Comments From rebecka@eazel.com 2001-01-17 15:46:35 ---- wrong bug. Sorry. ------- Additional Comments From rebecka@eazel.com 2001-01-17 18:48:47 ---- Here is one way to fix this problem. I'd like to change the text that will occur in the search bar to translated like this: /* Menu item in the search bar. Parenthensized items are context, and are message strings elsehwere. Translate only the word "Name" here, as it should appear in this context. */ N_("(Search for) Name (contains \"fish\")"), /* Menu item in the search bar. Parenthensized items are context, and are message strings elsehwere. Translate only the word "Content" here, as it should appear in this context. */ N_("(Search for) Content (includes all of \"fish tree\""), /* Menu item in the search bar. Parenthensized items are context, and are message strings elsehwere. Translate only the word "Type" here, as it should appear in this context. */ N_("(Search for) Type (is regular file)"), /* Menu item in the search bar. Parenthensized items are context, and are message strings elsehwere. Translate only the word "Size" here, as it should appear in this context. */ N_("(Search for) Size (larger than 400K)"), etc. Before displaying the string, translated or not, parenthesized items would be removed from the string, leaving only the string translated for this context. On second thought however, perhaps square brackets ('[' and ']') would be better in this context. The idea is the same, though. Do you think this would be an ok way to address this problem? ------- Additional Comments From menthos@menthos.com 2001-01-18 03:10:43 ---- I think this would work. It's only one thing that I'm unsure about and that is the lack of the word "that" in the contexts. I'm not sure if it is ok to leave out in English but it can't be left out in, for example, Swedish. For example, the translation of "Search for name contains 'fish'" would not be a proper sentence in Swedish, but "Search for name that contains 'fish'" would. Other than that, I think this proposal may work as it removes a lot of the context ambiguity in translation from the current design of the search interface. ------- Additional Comments From don@eazel.com 2001-01-18 14:11:52 ---- Yes! Great solution. Let's do this for 1.0. ------- Additional Comments From rebecka@eazel.com 2001-01-31 18:12:35 ---- I've added contextual messages and brief explanations. Things work fine in english now, but it would be great if a translator could verify that this works with updated translations. If you have time, Christian, I'd really appreciate it. Thanks. ------- Additional Comments From menthos@menthos.com 2001-02-02 07:19:13 ---- Updated Swedish search comments with context are now added. Norpan, could you also try this? ------- Additional Comments From d95mback@dtek.chalmers.se 2001-02-05 05:26:37 ---- The translation is correct, but the feature is not very useful still because there are no line breaks. I made a bug report on that. Bug #46313 ------- Bug moved to this database by unknown@bugzilla.gnome.org 2001-09-09 20:48 -------