mysociety / sobanukirwa-theme

The Alavateli theme for Sobanukirwa (Rwanda)
https://sobanukirwa.rw
MIT License
1 stars 3 forks source link

Use Rwandan English app.pot file rather than standard Alaveteli English #17

Closed StephenAbbott closed 9 years ago

StephenAbbott commented 9 years ago

Following advice from @crowbot, we created a Rwandan English instance of the Alaveteli English translation with the main purpose of converting all references to 'Freedom of Information' to 'Access to information'. I've sent over this .po file on email. Could the Rwandan English version please be used instead of the English one? cc @garethrees

garethrees commented 9 years ago

Yup! https://github.com/mysociety/alaveteli/pull/1974

garethrees commented 9 years ago

I've merged mysociety/alaveteli#1974 now.

Because of boring technical reasons, I've had to switch you on to our develop branch – rather than a stable release branch – to get this done by Thursday. I wouldn't have usually done this, but since you're not "live" and release 0.20 (mysociety/alaveteli#1911) is imminent (~next week), it allows this ticket to be completed. It also makes #13 available in the admin interface.

I've made a note (#23) to switch you over to 0.20 once its available.

StephenAbbott commented 9 years ago

Thanks @garethrees. But I've got a question about this. Some of the pages on sobanukirwa.rw are still showing UK references like http://sobanukirwa.rw/select_authority and http://sobanukirwa.rw/select_authority. The front page also still says Freedom of information on the right-hand side. Are these snippets of text that I failed to update in the Rwandan English version? I went through it several times and thought I had removed/changed all UK references and removed all FOI mentions to be replaced by access to information.

garethrees commented 9 years ago

Thats strange. It's definitely been changed in en_RW/app.po. Looks like the front page intro sentence isn't marked up for translation. I'll override that template in your theme.

garethrees commented 9 years ago

Looks like the spacing in the msgid was slightly different so it wasn't found as an available translation.

Developers can prevent this in future by ensuring strings to be translated don't have spaces (EDIT: spaces caused by indenting the string for code clarity) and linebreaks:

# bad
string = _("blah blah newline
something here")
=> "blah blah newline\nsomething here"

# bad
string = _(%Q(blah blah newline
something here))
=> "blah blah newline\nsomething here"

# bad
string = _("blah blah newline
            more stuff")
=> "blah blah newline\n          more stuff"

# good
string = _("blah blah no newline" \
           "something here")
=> "blah blah no newlinesomething here"
StephenAbbott commented 9 years ago

Thanks for working this out, @garethrees. Apologies if the bug resulted from poor editing of the .po file.