Hi,
Translators and developers : now the code has a way to handle context for tanslatable strings.
* Developpers: in case you insert some very short or ambiguous comments, you can add a context prefix to the string (and use a different macro): Q_("context|string") instead of _("string"). The context part of the string will appear in translation files (.po), but won't be displayed during execution (the rest of the string also appears in .po files and is displayed of course)
example: in select-toolbar.cpp -> previously: GtkWidget * sp_select_toolbox_spinbutton(gchar *label, gchar *data, float lower_limit, GtkWidget *us, GtkWidget *spw, gchar *tooltip, gboolean altx) { ... GtkWidget *l = gtk_label_new(_(label)); ... }
...
gtk_container_add(GTK_CONTAINER(vb), sp_select_toolbox_spinbutton(_("W"), "width", 1e-3, us, spw, _("Width of selection"),FALSE));
-> now: GtkWidget * sp_select_toolbox_spinbutton(gchar *label, gchar *data, float lower_limit, GtkWidget *us, GtkWidget *spw, gchar *tooltip, gboolean altx) { ... GtkWidget *l = gtk_label_new(Q_(label)); ... }
...
gtk_container_add(GTK_CONTAINER(vb), sp_select_toolbox_spinbutton(_("select_toolbar|W"), "width", 1e-3, us, spw, _("Width of selection"),FALSE));
* Translators: In .po files you'll find : msgid "context|string_to_translate"
and you'll just have to translate like this : msgstr "translated_string"
* And why this ? well, because in this case, W implies width (in select-toolbar), but in a different place of the code, it may have a different meaning, and thus would have to be translated differently. Internatinalisation tools don't allow it by default (in this case you must have several .po files or different strings to translate). Now, in this case, just use the context trick, and internationalisation tools will do the job.
* I've not yet inserted comments about this in the code: I plan to do it this week. However, I've added a few lines in the wiki (in developpers page and translation page)
Regards,
Matiphas