Bug 307494 - Internationalization issue with the “>>” characters
Summary: Internationalization issue with the “>>” characters
Status: RESOLVED FIXED
Alias: None
Product: krecipes
Classification: Applications
Component: general (show other bugs)
Version: 2.0-beta2
Platform: Chakra Linux
: NOR minor
Target Milestone: ---
Assignee: Unassigned bugs mailing-list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-09-27 19:23 UTC by Adrián Chaves (Gallaecio)
Modified: 2015-02-21 14:04 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 2.1


Attachments
Files to reproduce the error. (176.77 KB, application/x-xz)
2012-09-28 17:39 UTC, Adrián Chaves (Gallaecio)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Adrián Chaves (Gallaecio) 2012-09-27 19:23:21 UTC
Translating the application, I noticed it is possible to translate some buttons that look like “Text >>”. In the interface, when you press these buttons, they turn into “Text <<”.

However, it turns out you cannot translate “Text <<”. That means one of the following two things:
- It was forgotten to make the “Text <<” string translatable.
- The suffix is changed dynamically, from code. So, if I were to translate “Text >>” as “Texto ↓”, not only would I not be able to translate the “Text <<” string, but I might also generate an error in the application, which would — hopefully — just convert “Texto →” into “Texto<<”.

Whichever the case is, it should be fixed.

Reproducible: Always
Comment 1 Burkhard Lück 2012-09-28 05:15:01 UTC
Please provide a screenshot of this issue
Comment 2 Adrián Chaves (Gallaecio) 2012-09-28 17:39:33 UTC
Created attachment 74217 [details]
Files to reproduce the error.

I was translating trunk, and it seems in the stable PO file only “Categories” includes the “>>” part in the translation. So here I my steps to reproduce in stable:

1. Install the .mo file attached to your locale folder (/usr/share/locale/<lang code>/LC_MESSAGES/krecipes.mo).
2. Run KRecipes.
3. Go to the Advanced (“Avanzada”) tab.
4. See how there is a button with the text “Categoría ↓”. (step1.png)
5. Click the button, and see how it turns into “Categoría <<”. (step2.png)
6. Click it again, and see how it turns into “Categoría >>”. (step3.png)

As you can see, the >>/<< part is being changed programatically. That part should be translatable too.

Possible approaches to resolve the bug (from the point of view of a translator):
- Make it possible to translate the words for one side (“Title”, “Category”…), the symbols (“<<” and “>>” parts) in two separated strings, and then another string like “%1 %2” where the translator can specify how the pairs (word and symbol) are glued together. Maybe provide two different glue strings, one for each symbol, since some languages might want to, for example, use “>>” as suffix but “<<” as preffix (English: “%1 %2” & “%1 %2”; other “%1 %2” and “%2 %1”).
- Make all the possible combinations translatable: “Title >>”, “Title <<”, “Category >>”, “Category <<”…
Comment 3 Pino Toscano 2015-02-21 13:37:07 UTC
Some of the issues have been fixed by me over 2 years ago:
  http://commits.kde.org/krecipes/d1452d877392732408f7b09914069706718b415c

The advanced dialog need to be fixed so the pressed down push button texts are not created by manipulating (cut & paste) the non-pressed texts.
Comment 4 Pino Toscano 2015-02-21 14:04:11 UTC
Git commit e0e545f5c2c842488ea431f939acf87e11ab12af by Pino Toscano.
Committed on 21/02/2015 at 13:58.
Pushed by pino into branch 'master'.

Fix toggling of text buttons

Instead of removing the trailing " <<" or " >>" from the translated
texts, set the new text as a whole.
This allows texts to be fully translated, in the correct way.
FIXED-IN: 2.1

M  +76   -17   src/dialogs/advancedsearchdialog.cpp
M  +9    -1    src/dialogs/advancedsearchdialog.h

http://commits.kde.org/krecipes/e0e545f5c2c842488ea431f939acf87e11ab12af