-
Notifications
You must be signed in to change notification settings - Fork 11
Front end string translation #524
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
struan
wants to merge
16
commits into
509-welsh-translation-staging
Choose a base branch
from
516-front-end-string-translation
base: 509-welsh-translation-staging
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Front end string translation #524
struan
wants to merge
16
commits into
509-welsh-translation-staging
from
516-front-end-string-translation
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
48abbf5 to
dec690f
Compare
b3ebf3a to
420ada1
Compare
1e599d9 to
644f8ef
Compare
6cb7ce5 to
0273cb9
Compare
420ada1 to
15b5a28
Compare
Note that some of the strings for this page are in votingarea.php which is where xgettext finds them. However, they end up getting passed through gettext again here because they are held in data structures that get parsed before the locale is set. That's why there are things like `$v['rep_name'] = _($va_rep_name[$vat]);` in the code.
Adds translations on the compose, preview and confirmation email sent pages
This uses parsedown for the longer answers to hopefully make it a bit easier to translate as you don't need to wrap things in p tags
f4d316c to
cfeed17
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This updates all the strings in the front end and wraps them in gettext calls for translation.
In general I've gone with the theory of more context is better over excluding HTML so some of these include quite a bit of HTML which I think is reasonable, especially where the text is linked. I've also tried to extract things that might change, e.g URLs with tracking codes, to avoid small changes requiring recompiling the translations.
For longer bits of text it passes things through Parsedown to strip out lots of p tags.
It does not translate the stats pages, the fictional postcodes page and the overseas correspondence pages.
Fixes #516