r16194 - gnucash/trunk/src - Mark a bunch of Since Last Run dialog strings translatable. Stop doing an unused and sometimes invalid date-formatting operation. Task-list cleanup.

Josh Sled jsled at cvs.gnucash.org
Wed Jun 20 19:20:46 EDT 2007


Author: jsled
Date: 2007-06-20 19:20:46 -0400 (Wed, 20 Jun 2007)
New Revision: 16194
Trac: http://svn.gnucash.org/trac/changeset/16194

Modified:
   gnucash/trunk/src/doc/sx.rst
   gnucash/trunk/src/gnome/dialog-sx-since-last-run.c
Log:
Mark a bunch of Since Last Run dialog strings translatable.  Stop doing an unused and sometimes invalid date-formatting operation.  Task-list cleanup.


Modified: gnucash/trunk/src/doc/sx.rst
===================================================================
--- gnucash/trunk/src/doc/sx.rst	2007-06-20 23:19:55 UTC (rev 16193)
+++ gnucash/trunk/src/doc/sx.rst	2007-06-20 23:20:46 UTC (rev 16194)
@@ -110,33 +110,35 @@
   - [ ] model-ize
 
     - (check_consistent, especially...)
+    - Notes::
 
-GncSxEditModel* gnc_sx_edit_model_new(SchedXaction *sx);
+    GncSxEditModel* gnc_sx_edit_model_new(SchedXaction *sx);
 
-gnc_sxed_check_changed( GncSxEditorDialog *sxed )
-gnc_sxed_check_consistent( GncSxEditorDialog *sxed )
-gnc_sxed_save_sx( GncSxEditorDialog *sxed )
+    gnc_sxed_check_changed( GncSxEditorDialog *sxed )
+    gnc_sxed_check_consistent( GncSxEditorDialog *sxed )
+    gnc_sxed_save_sx( GncSxEditorDialog *sxed )
 
+    gchar* gnc_sx_edit_model_get_name(GncSxEditModel *mdl);
+    void gnc_sx_edit_model_set_name(GncSxEditModel *mdl, gchar *new_name);
 
-gchar* gnc_sx_edit_model_get_name(GncSxEditModel *mdl);
-void gnc_sx_edit_model_set_name(GncSxEditModel *mdl, gchar *new_name);
-
 - gnc_dense_cal
 
-  - [x] {0, 1, 2, 3, 4, 6, 12} month selection for dense calendar
+  - [ ] eliminate the XXX FIXME "cannot find tag [1]" messages.
 
-    - [x] conf-save value
-
   - [ ] code cleanup
 
     - [x] min-size
 
-  - [x] start-of-week := {sun,mon} (via locale)
   - [ ] change number-of-month properties to display-named properties (width, length)
   - [ ] gconf setting for dense-cal font-size reduction
   - [?] better transient/floating window
   - [/] (re-format file)
   - ! [x] font handling: gdk -> pango
+  - [x] start-of-week := {sun,mon} (via locale)
+  - [x] {0, 1, 2, 3, 4, 6, 12} month selection for dense calendar
+
+    - [x] conf-save value
+
   - [x] set_model(GncTemporalInstancesModel *mdl)
 
     - [x] new interface creation.
@@ -228,6 +230,7 @@
     spinning... it is run because the changed(?) signal handler is too slow
 
   - [ ] support nth-weekday Recurrence period.
+
   - [x] Freq=none doesn't work::
 
     * 17:00:29  CRIT <gnc.engine.recurrence> recurrenceListNextInstance: assertion `rlist && ref && next && g_date_valid(ref)' failed
@@ -237,16 +240,16 @@
 
   - [ ] "reminder" instances should show number of days until due
   - [ ] "Find unfinished" button; count; sensitize Ok as function of unfinished.
-  - [ ] text changes [tw20070614]_
-
-    - [ ] "Sx, Instance, Variable" -> "Transaction"
-    - [ ] "Instance State" -> "Status"
-    - [ ] "Variable Value" -> "Value"
-
   - [ ] bold SX names [tw20070614]_
   - [ ] checkbox/option to show/hide Reminders [tw20070614]_
   - [ ] filter/remove SXes that don't have any instances in the list [tw20070614-2]_
   - [ ] remove tree expand controls, except for non-to-create instances with variables [tw200070614-2]_
+  - [x] text changes [tw20070614]_
+
+    - "Sx, Instance, Variable" -> "Transaction"
+    - "Instance State" -> "Status"
+    - "Variable Value" -> "Value"
+
   - ! [x] save/restore dialog window size
   - [x] remove split pane
   - [x] "auto" scrollbars

Modified: gnucash/trunk/src/gnome/dialog-sx-since-last-run.c
===================================================================
--- gnucash/trunk/src/gnome/dialog-sx-since-last-run.c	2007-06-20 23:19:55 UTC (rev 16193)
+++ gnucash/trunk/src/gnome/dialog-sx-since-last-run.c	2007-06-20 23:20:46 UTC (rev 16194)
@@ -359,14 +359,13 @@
     g_signal_connect(adapter->real, "rows-reordered", G_CALLBACK(gsslrtma_proxy_rows_reordered), adapter);
 }
 
-/* @@fixme: i18n. **/
 /* @@fixme: non-staticize. **/
 static char* gnc_sx_instance_state_names[] = {
-    ("Ignored"),
-    ("Postponed"),
-    ("To-Create"),
-    ("Reminder"),
-    ("Created"),
+    "Ignored",
+    "Postponed",
+    "To-Create",
+    "Reminder",
+    "Created",
     NULL
 };
 
@@ -375,6 +374,17 @@
 GtkTreeModel*
 gnc_sx_get_slr_state_model(void)
 {
+    // This lists exists only to have translatable versions of the strings above.
+    char* _i18n_gnc_sx_instance_state_names[] = {
+        _("Ignored"),
+        _("Postponed"),
+        _("To-Create"),
+        _("Reminder"),
+        _("Created"),
+        NULL
+    };
+    if (_i18n_gnc_sx_instance_state_names == NULL) { ; }
+
     if (_singleton_slr_state_model == NULL)
     {
         int i;
@@ -386,7 +396,7 @@
             gtk_list_store_insert_with_values(GTK_LIST_STORE(_singleton_slr_state_model),
                                               &iter,
                                               SX_INSTANCE_STATE_MAX_STATE + 1,
-                                              0, gnc_sx_instance_state_names[i], -1);
+                                              0, _(gnc_sx_instance_state_names[i]), -1);
         }
     }
     return _singleton_slr_state_model;
@@ -426,7 +436,6 @@
         FreqSpec *fs;
         GString *frequency_str;
         char last_occur_date_buf[MAX_DATE_LENGTH+1];
-        char next_occur_date_buf[MAX_DATE_LENGTH+1];
 
         frequency_str = g_string_sized_new(32);
         fs = xaccSchedXactionGetFreqSpec(instances->sx);
@@ -436,7 +445,7 @@
             GDate *last_occur = xaccSchedXactionGetLastOccurDate(instances->sx);
             if (last_occur == NULL || !g_date_valid(last_occur))
             {
-                g_stpcpy(last_occur_date_buf, "never");
+                g_stpcpy(last_occur_date_buf, _("never"));
             }
             else
             {
@@ -446,8 +455,6 @@
             }
         }
 
-        qof_print_gdate(next_occur_date_buf, MAX_DATE_LENGTH, &instances->next_instance_date);
-
         if (!gtk_tree_model_iter_nth_child(GTK_TREE_MODEL(model->real), &sx_tree_iter, NULL, ++instances_index))
         {
             gtk_tree_store_append(model->real, &sx_tree_iter, NULL);
@@ -480,7 +487,7 @@
                 }
                 gtk_tree_store_set(model->real, &inst_tree_iter,
                                    SLR_MODEL_COL_NAME, instance_date_buf,
-                                   SLR_MODEL_COL_INSTANCE_STATE, gnc_sx_instance_state_names[inst->state],
+                                   SLR_MODEL_COL_INSTANCE_STATE, _(gnc_sx_instance_state_names[inst->state]),
                                    SLR_MODEL_COL_VARAIBLE_VALUE, NULL,
                                    SLR_MODEL_COL_INSTANCE_VISIBILITY, TRUE,
                                    SLR_MODEL_COL_VARIABLE_VISIBILITY, FALSE,
@@ -508,7 +515,7 @@
                         }
                         else
                         {
-                            tmp_str = g_string_new("(need value)");
+                            tmp_str = g_string_new(_("(need value)"));
                         }
 
                         if (!gtk_tree_model_iter_nth_child(GTK_TREE_MODEL(model->real),
@@ -829,7 +836,7 @@
      
     for (i = 0; i < SX_INSTANCE_STATE_CREATED; i++)
     {
-        if (strcmp(value, gnc_sx_instance_state_names[i]) == 0)
+        if (strcmp(value, _(gnc_sx_instance_state_names[i])) == 0)
             break;
     }
     if (i == SX_INSTANCE_STATE_CREATED)
@@ -926,7 +933,7 @@
         gtk_tree_view_set_model(dialog->instance_view, GTK_TREE_MODEL(dialog->editing_model));
 
         renderer = gtk_cell_renderer_text_new();
-        col = gtk_tree_view_column_new_with_attributes("SX, Instance, Variable", renderer,
+        col = gtk_tree_view_column_new_with_attributes(_("Transaction"), renderer,
                                                        "text", SLR_MODEL_COL_NAME,
                                                        NULL);
         gtk_tree_view_append_column(dialog->instance_view, col);
@@ -942,7 +949,7 @@
                          "edited",
                          G_CALLBACK(instance_state_changed_cb),
                          dialog);
-        col = gtk_tree_view_column_new_with_attributes("Instance State", renderer,
+        col = gtk_tree_view_column_new_with_attributes(_("Status"), renderer,
                                                        "text", SLR_MODEL_COL_INSTANCE_STATE,
                                                        "visible", SLR_MODEL_COL_INSTANCE_VISIBILITY,
                                                        // you might think only "sensitive" is required to
@@ -961,7 +968,7 @@
                          "edited",
                          G_CALLBACK(variable_value_changed_cb),
                          dialog);
-        col = gtk_tree_view_column_new_with_attributes("Variable Value", renderer,
+        col = gtk_tree_view_column_new_with_attributes(_("Value"), renderer,
                                                        "text", SLR_MODEL_COL_VARAIBLE_VALUE,
                                                        "visible", SLR_MODEL_COL_VARIABLE_VISIBILITY,
                                                        NULL);



More information about the gnucash-changes mailing list