Zoom not working in Turkish because % is incorrectly expected at the end of the string
Turkish has a different approach for % percent tags. Different from many language the % tag goes to the end of the number.
For example English: 100% mean Turkish: %100.
These codes from app/menus.c file.
/* Zoom Combo Box Entry */
w = gtk_combo_box_text_new_with_entry ();
g_object_set_data (G_OBJECT (toolbar),
DIA_INTEGRATED_TOOLBAR_ZOOM_COMBO,
w);
integrated_ui_toolbar_add_custom_item (toolbar, w);
gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (w), ZOOM_FIT);
gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (w), _("800%"));
gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (w), _("400%"));
gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (w), _("300%"));
gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (w), _("200%"));
gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (w), _("150%"));
gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (w), _("100%"));
gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (w), _("75%"));
gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (w), _("50%"));
gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (w), _("25%"));
gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (w), _("10%"));
/* "DiaZoomCombo" probably could work for both UI cases */
static void
integrated_ui_toolbar_zoom_combo_selection_changed (GtkComboBox *combo,
gpointer user_data)
{
/*
* We call gtk_combo_get_get_active() so that typing in the combo entry
* doesn't get handled as a selection change
*/
if (gtk_combo_box_get_active (combo) != -1) {
float zoom_percent;
gchar *text = gtk_combo_box_text_get_active_text (GTK_COMBO_BOX_TEXT (combo));
if (sscanf (text, "%f", &zoom_percent) == 1) {
view_zoom_set (zoom_percent * 10.0);
} else if (g_ascii_strcasecmp (text, ZOOM_FIT) == 0) {
view_show_all_callback (NULL);
}
g_free (text);
}
}
These are my translations from tr.po file.
#: app/menus.c:599
msgid "300%"
msgstr "%300"
#: app/menus.c:600
msgid "200%"
msgstr "%200"
#: app/menus.c:601
msgid "150%"
msgstr "%150"
#: app/menus.c:602
msgid "100%"
msgstr "%100"
#: app/menus.c:603
msgid "75%"
msgstr "%75"
#: app/menus.c:604
msgid "50%"
msgstr "%50"
#: app/menus.c:605
msgid "25%"
msgstr "%25"
#: app/menus.c:606
msgid "10%"
msgstr "%10"
There may be some other conflict with other languages too.
To avoid conflict we might remove translatable tags from those strings.
Edited by Ghost User