diff options
author | Matthew Somerville <matthew-github@dracos.co.uk> | 2018-09-27 14:56:52 +0100 |
---|---|---|
committer | Matthew Somerville <matthew-github@dracos.co.uk> | 2018-09-27 14:56:52 +0100 |
commit | b3fea58c6f9a29ec5fb428d82c25e3a82ac962af (patch) | |
tree | f7b79502c8bcbc158451c205944ee8d337750f8e /docs/customising/language/technical.md | |
parent | 371927debffc6bb42d8d86a90afc715d1d837e74 (diff) |
Move docs from gh-pages branch.
Diffstat (limited to 'docs/customising/language/technical.md')
-rw-r--r-- | docs/customising/language/technical.md | 38 |
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. |