GNOME Bugzilla – Bug 115633
Don't split sentences in gedit
Last modified: 2004-12-22 21:47:04 UTC
#: gedit/dialogs/gedit-page-setup-dialog.c:587 #: gedit/dialogs/gedit-page-setup-dialog.c:629 msgid "" "page-setup-dialog.glade2'.\n" "\n" "Reinstall gedit." #: gedit/dialogs/gedit-page-setup-dialog.c:587 msgid "Could not find '" #: gedit/dialogs/gedit-page-setup-dialog.c:628 msgid "Could not find the required widgets inside '" This split message design is horribly broken with regards to localization. Sentences can only be translated in their entireness, don't split sentences into several paragraphs. More details about this problem on http://developer.gnome.org/doc/tutorials/gnome-i18n/developer.html#split-sentences. In addition, please do not include explicit file names in messages; replace them with %s where possible. More about that and the reasons for that on http://developer.gnome.org/doc/tutorials/gnome-i18n/developer.html#generic.
Created attachment 17856 [details] [review] Patch against HEAD. - obsoleted by newer patch
This patch reconcatenates the strings Christian was referring to and removes all newline characters from our msgids :). The onliest problem remaining is the markup. Changing some bug data. regs, Chris
Chris: thanks for the patch. I will give a detailed look at it ASAP. ATM, I have only a comment: - don't use C++ like comments in C code. What you mean with "Changing some bug data."? Which ones?
Paolo: Forgot to do so. I wanted to add PATCH keyword, lower severity to minor and raise priority to high (because of the patch). What do you mean by CPP code comments? I'm used to add one-liners by // and the rest using /**/. BTW: What is the preferred coding style? I discovered several inconsistencies in your's, namely the argument intention: g_strconcat (_("I'm a string"), <----------->_("me, too"), <----------->NULL); vs. g_strconcat ( <--tab-->_("I'm a string"), <--tab-->_("me, too"), <--tab-->NULL); regs, Chris
Do'h, forgot again. Changing some bug data (really!). regs, Chris
You should not use // in C code. About coding style... actually I'm not so religious about coding style in gedit. It have had a lot of authors and mantainers, so the coding style is a mix of different styles. I prefer to use: g_strconcat (_("I'm a string"), <TAB><TAB><->_("me, too"), <TAB><TAB><->NULL); Where <-> is the needed number of spaces.
That's my favorite argument coding style, too. I don't want you to be religious about that at all, it should just be made clear what's preferable so that the coders can halfway stick to that suggested layout. regs, Chris
How's this going?
*** Bug 116695 has been marked as a duplicate of this bug. ***
*** Bug 119409 has been marked as a duplicate of this bug. ***
Bumping severity to normal, as the current design may very well make these messages impossible to translate correctly in some languages.
Created attachment 19130 [details] [review] Tested patch against HEAD to fix some of the strings.
Attached a patch at for fixing a couple of the problems with gnome-page-setup-dialog.c, plus one other string. This patch is a slightly modified version of that proposed for bug #117360. The strings in gnome-page-setup-dialog.c should not change from the user's point of view; they should just be a lot easier to translate.
*** Bug 121047 has been marked as a duplicate of this bug. ***
This problem is really bad. Please fix it ASAP. I wish it is fixed before GNOME 2.4 released.
This is a nasty problem. However, there is a problem with fixing this before 2.4. Although the strings wouldn't change from a user-visible point of view, it would break all existing translations of gedit. This bug has been around for a while and encouragements were made to fix this before the string freeze, but it didn't happen. We might just have to accept that gedit isn't properly l10nable for 2.4.
I'm really sorry but, due to personal reason, I had not the time to fix it before string freeze. It will be surely fixed in the next majorrelease.
Applied a modified version of the Dafydd Harries' patch
Christian: may you attach an updated version of your patch? Note that in --- gedit/gedit-document.c 12 Jun 2003 09:32:16 -0000 1.72 +++ gedit/gedit-document.c 28 Jun 2003 15:38:30 -0000 you are leaking msg. Please, remember to use /* */ comments (instead of // ones) Is it better "The file \"%s\" is" or "The file '%s' is", i.e. should I use single or double quotes?
From bug #117360: Most of the remaining strings that I don't like occur within glade files and I have no idea about improving them. The problem is that messages have been broken up, making them much much more difficult to translate accurately: #: gedit/dialogs/gedit-preferences.glade2.h:39 msgid "Print _line numbers every" #: gedit/dialogs/gedit-preferences.glade2.h:54 msgid "_Autosave current file every" #: gedit/dialogs/page-setup-dialog.glade2.h:14 msgid "_Number every"
*** Bug 117360 has been marked as a duplicate of this bug. ***
hmmm... is it really necessary to remove all newline characters from msgids?
Not necessarily, but preferrable. Newlines should only be used where necessary, and not for line wrapping where automatic line wrapping can be used instead.
Christian: may you please attach an updated version of your patch?
Created attachment 22796 [details] [review] Proposed patch. Don't insert "\n\n" where g_warning is used, always use \" characters around file name.
Are you guys still getting this problem in CVS HEAD?
closing. These strings are fixed in cvs HEAD. If you find other specific strings with split sentences, feel free to open other bugs.