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
Please provide a screenshot of this issue
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 <<”…
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.
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