Update CODING and HACKING files, and add po/README file for translators.
authorLaurent Monin <geeqie@norz.org>
Fri, 9 May 2008 08:03:25 +0000 (08:03 +0000)
committerLaurent Monin <geeqie@norz.org>
Fri, 9 May 2008 08:03:25 +0000 (08:03 +0000)
CODING
HACKING
po/README [new file with mode: 0644]

diff --git a/CODING b/CODING
index 42bcb38..dfb9411 100644 (file)
--- a/CODING
+++ b/CODING
@@ -1,12 +1,14 @@
 Please keep the general coding style of Geeqie:
 
 Space after if, while and for:
+------------------------------
 
 while (...)
 for (...)
 if (...)
 
 Indentation of {}:
+------------------
 
 while (...)
        {
@@ -23,16 +25,35 @@ else
        }
 
 Spaces around operators:
+------------------------
 
 i = 2;
+x = i * (j / 2);
+
 
 Space after comma:
+------------------
 func(a, b, c);
 
-Use glib functions when possible (ie. g_ascii_isspace() instead of isspace()).
+Functions without any parameter should be declared using void:
+--------------------------------------------------------------
+gint function(void)
+{
+...
+}
+
+Use glib types:
+---------------
 Please use glib types when possible (ie. gint and gchar instead of int and char)
 .
 
+Use glib functions:
+-------------------
+Use glib functions when possible (ie. g_ascii_isspace() instead of isspace()).
+Check if used functions are not deprecated.
+
+Others:
+-------
 Check twice the indentation and spurious whitespaces.
 
-Try to use explicit variable and function names
+Try to use explicit variable and function names.
diff --git a/HACKING b/HACKING
index 5ffd6d6..1aa898d 100644 (file)
--- a/HACKING
+++ b/HACKING
@@ -4,11 +4,15 @@ The Makefiles and configure script are generated by the autogen.sh script, usual
 only distributed with snapshot releases. Running autogen.sh requires automake
 and autoconf. GNU gettext may also be needed by autogen.sh.
 
-CVS commits _require_ a ChangeLog entry, commits without a ChangeLog will be reverted.
+SVN commits _require_ an explicit log message. Think it will be used in the release
+Changelog.
 
-Translators create a translation by creating the appropriate .po file in the /po
-directory. Please see the gettext info pages for an overview and instructions.
-Basically: Add your language code to the   ALL_LINGUAS=   line in configure.in,
-then get started translating the strings in your ??.po file.
-Note: The strings for debug output is intentionally not marked for translation.
+Coders should respect general coding style (see CODING).
 
+Coders, please resync po/POTFILES.in if you add or remove source files from src/
+directory (using regen_potfiles.sh script in po/) and re-run make update-po 
+when appropriate to keep translations in sync with the code.
+
+Maintainers, don't forget to run make update-po before releases.
+
+Translators, please have a look at po/README.
diff --git a/po/README b/po/README
new file mode 100644 (file)
index 0000000..89d8c0c
--- /dev/null
+++ b/po/README
@@ -0,0 +1,18 @@
+Translators create a translation by creating the appropriate .po file in the /po
+directory. Please see the gettext info pages for an overview and instructions.
+Basically: Add your language code to the   ALL_LINGUAS=   line in configure.in,
+then get started translating the strings in your ??.po file.
+Note: The strings for debug output is intentionally not marked for translation.
+
+To update a specific translation, one may use make update-po PO=[lang]  (ie. make update-po PO=fr).
+
+To update all translation files, use make update-po.
+You should only use it when needed (before a release or when there were many
+changes in source code).
+
+
+
+Helper scripts:
+
+gen_translations_stats.sh      generate statistics about translations
+regen_potfiles.sh              generate a patch to sync POTFILES.in with current source files