Homec4science

Provide a function for validating translations

Authored by vrana <jakubv@fb.com> on Aug 6 2012, 19:53.

Description

Provide a function for validating translations

Summary:
Based on discussion at T1139#32, we will not provide context to translators.
Thus we should limit the translations to have the same special characters.

This disallows some originals: e.g. 'print <filename>' in text context - one should use 'print <%s>' with pht('filename').
And some translations: e.g. 'me & you' translated as 'me and you'.

We should call this from linter but I don't know how.
We can easily call it from addTranslations() in runtime but I'm not sure it's worth the overhead.

Test Plan: New test.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T1139

Differential Revision: https://secure.phabricator.com/D3164

Details

Committed
vrana <jakubv@fb.com>Aug 6 2012, 20:31
Pushed
aubortMar 17 2017, 12:03
Parents
rPHUf23bc5eea2f7: Fix an issue where PHP_EOL_COMMENT tokens were discarded on EOF
Branches
Unknown
Tags
Unknown

Event Timeline

vrana <jakubv@fb.com> committed rPHU7ac3de5ede7e: Provide a function for validating translations (authored by vrana <jakubv@fb.com>).Aug 6 2012, 20:31