Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Document translation commands.

  • Loading branch information...
commit c278c5a2592c7e0b694682af763d713228442556 1 parent 9b1de70
@dracos dracos authored
6 customising/
@@ -17,6 +17,12 @@ to allow the site to offer versions localised to a single authority and should
not be needed for most installs. Listed below are the most useful options that
can be changed:
+* language_override
+ Return a language code string from this function if you wish your cobrand
+to always be in a particular language, rather than try and work it out from the
+domain name or the browser’s settings.
* geocode_postcode
This function is used to convert postcodes (zip codes, etc.) entered into a
0  customising/ → customising/language/
File renamed without changes
38 customising/language/
@@ -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
+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`
+ 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.
Please sign in to comment.
Something went wrong with that request. Please try again.