GNOME Bugzilla – Bug 162866
Please avoid string surgery for ordinals in gnome-schedule
Last modified: 2005-08-16 10:53:08 UTC
#: src/crontabEditorHelper.py:197 src/crontabEditorHelper.py:208 msgid "st. " #: src/crontabEditorHelper.py:199 msgid "th. " try: entFixValue = int (self.entFix.get_text()) if entFixValue == 1: self.lblFixEntity.set_label (_("st. ") + self.trans_field) else: self.lblFixEntity.set_label (_("th. ") + self.trans_field) except: pass try: entEveryValue = int (self.entEvery.get_text()) if entEveryValue > 1: self.lblEveryEntity.set_label (self.trans_field + _("s")) else: self.lblEveryEntity.set_label (_("st. ") + self.trans_field) except: pass Please *never* do string surgery like this! This is inheritly untranslatable. As you should know, ordinals are different in almost every language. I'm amazed that this string surgery in code would even work for one.
*** Bug 162848 has been marked as a duplicate of this bug. ***
*** Bug 162870 has been marked as a duplicate of this bug. ***
*** Bug 156820 has been marked as a duplicate of this bug. ***
The dups are not really dups. But the person who's going to fix translation issues will need to fix all of them before I consider it as a fix :-). Please set this bug to assigned if you plan to work on this.
Then, you should have made them block this one instead (look for field "Bug #xxxx blocks:").
changed all the duplicates to blockers.
Gaute, in reply to your message to gnome-schedule-devel list: "... To be able to translate every 'Happens the [ ] minute' strings I created a function that splits the translated string on '[ ]' so that a translator can write text with textentries inside ..." This doesn't solve the entire problem. The first thing is that you use ordinals again inside your sentence. You could see it in English already (Happens the five minute). The probably bigger problem is, that this sentence needs plural handling. Some languages may require to change the "minute" part according to the count. But you cannot use ngettext because you have a text entry instead of a string in between. The only solution I see is to redesign the helper dialog a little bit. I've made a fast mockup that should fit our needs as translators and follows the HIG quite good. The "Other expression" option is useless and therefore dropped. One can type directly into editor window fields without having to start the helper.
Created attachment 50706 [details] helper dialog mockup
Yes, seems much easier. And doesn't look ugly. Please commit.
There's nothing to commit. Made the picture only... :)
I changed it into something like yours.. but it looks kinda ugly.
Updated the gui some, we'll go for this solution.