aboutsummaryrefslogtreecommitdiffstats
path: root/docs/customising/language/technical.md
diff options
context:
space:
mode:
authorMarius Halden <marius.h@lden.org>2019-10-30 19:28:55 +0100
committerMarius Halden <marius.h@lden.org>2019-10-30 19:28:55 +0100
commit377bd96aab7cad3434185c30eb908c9da447fe40 (patch)
tree7ec5527e205d5b62caaa862a7de8cd25199c8bf0 /docs/customising/language/technical.md
parent56f61b1441070aa0b9ddcfc74aca46c20313609f (diff)
parent92b253904062edd533e55c22824de6fd01e2f7c1 (diff)
Merge tag 'v2.6' into fiksgatami-dev
Diffstat (limited to 'docs/customising/language/technical.md')
-rw-r--r--docs/customising/language/technical.md38
1 files changed, 38 insertions, 0 deletions
diff --git a/docs/customising/language/technical.md b/docs/customising/language/technical.md
new file mode 100644
index 000000000..11a10a147
--- /dev/null
+++ b/docs/customising/language/technical.md
@@ -0,0 +1,38 @@
+---
+layout: page
+title: Adding new strings to FixMyStreet
+---
+
+# Adding new strings
+
+<p class="lead">Technical details for people who wish to add new strings for
+translation.</p>
+
+You will need to install the Locale::Maketext::Extract package in order to
+parse strings out of templates:
+
+ $ cpanm -l local-carton Locale::Maketext::Extract
+
+A new clean `.po` file, containing all the strings marked for translation in
+the code and templates, can be created by running the `bin/gettext-extract`
+script.
+
+ export PERL5LIB="local-carton/lib/perl5:local/lib/perl5"
+ export PATH="local-carton/bin:$PATH"
+ bin/gettext-extract
+
+To merge in new strings with the existing translations:
+
+ bin/gettext-merge
+
+To compile translations into `.mo` files:
+
+ commonlib/bin/gettext-makemo
+
+You may find it helpful to add an alias to your .gitconfig:
+
+ [alias]
+ podiff = "!f() { git diff --color $@ | grep -v '^ ' | grep -v @@ | grep -v '#:' | less -FRSX; }; f"
+
+Then `git podiff locale` will show you actual changes, rather than all the
+changes to comments and line numbers.