[geany/geany] a98290: Define default template date format strings globally and make them translatable

Christian Dywan git-noreply at xxxxx
Sun Mar 17 16:17:09 UTC 2013


Branch:      refs/heads/master
Author:      Christian Dywan <christian at twotoasts.de>
Committer:   Enrico Tröger <enrico.troeger at uvena.de>
Date:        Sun, 17 Mar 2013 16:17:09 UTC
Commit:      a982908bec0c2ed9d5d846af205aafd497777d09
             https://github.com/geany/geany/commit/a982908bec0c2ed9d5d846af205aafd497777d09

Log Message:
-----------
Define default template date format strings globally and make them translatable


Modified Paths:
--------------
    src/keyfile.c
    src/templates.h

Modified: src/keyfile.c
6 files changed, 3 insertions(+), 3 deletions(-)
===================================================================
@@ -878,9 +878,9 @@ static void load_dialog_prefs(GKeyFile *config)
 	template_prefs.mail = utils_get_setting_string(config, PACKAGE, "pref_template_mail", tmp_string);
 	g_free(tmp_string);
 	g_free(tmp_string2);
-	template_prefs.year_format = utils_get_setting_string(config, PACKAGE, "pref_template_year", "%Y");
-	template_prefs.date_format = utils_get_setting_string(config, PACKAGE, "pref_template_date", "%Y-%m-%d");
-	template_prefs.datetime_format = utils_get_setting_string(config, PACKAGE, "pref_template_datetime", "%d.%m.%Y %H:%M:%S %Z");
+	template_prefs.year_format = utils_get_setting_string(config, PACKAGE, "pref_template_year", GEANY_TEMPLATES_FORMAT_YEAR);
+	template_prefs.date_format = utils_get_setting_string(config, PACKAGE, "pref_template_date", GEANY_TEMPLATES_FORMAT_DATE);
+	template_prefs.datetime_format = utils_get_setting_string(config, PACKAGE, "pref_template_datetime", GEANY_TEMPLATES_FORMAT_DATETIME);
 
 	/* tools */
 	cmd = utils_get_setting_string(config, "tools", "terminal_cmd", "");


Modified: src/templates.h
3 files changed, 3 insertions(+), 0 deletions(-)
===================================================================
@@ -31,6 +31,9 @@
 G_BEGIN_DECLS
 
 #define GEANY_TEMPLATES_INDENT 3
+#define GEANY_TEMPLATES_FORMAT_YEAR              C_("DefaultYear", "%Y")
+#define GEANY_TEMPLATES_FORMAT_DATE              C_("DefaultDate", "%Y-%m-%d")
+#define GEANY_TEMPLATES_FORMAT_DATETIME          C_("DefaultDateTime", "%d.%m.%Y %H:%M:%S %Z")
 
 enum
 {



--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).


More information about the Commits mailing list