Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Issue 29659605: Issue 6231 - Add tests for translation string substitution (Closed)

Created:
Jan. 8, 2018, 5:31 p.m. by Vasily Kuznetsov
Modified:
Jan. 19, 2018, 8:06 p.m.
Reviewers:
Jon Sonesen
Visibility:
Public.

Description

Issue 6231 - Add tests for translation string substitution

Patch Set 1 #

Total comments: 1

Patch Set 2 : Add tests for different types of pages; also for includes and templates #

Total comments: 5

Patch Set 3 : Add tests for partial translation and for get_string #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+345 lines, -19 lines) Patch
M cms/sources.py View 1 1 chunk +7 lines, -8 lines 0 comments Download
M tests/expected_output/de/translate View 1 chunk +8 lines, -1 line 0 comments Download
A tests/expected_output/de/translate-html View 1 1 chunk +19 lines, -0 lines 0 comments Download
A tests/expected_output/de/translate-include View 1 1 chunk +16 lines, -0 lines 0 comments Download
A tests/expected_output/de/translate-not-enough@dynamic View 1 2 1 chunk +8 lines, -0 lines 0 comments Download
A tests/expected_output/de/translate-not-enough@static View 1 2 1 chunk +1 line, -0 lines 0 comments Download
A tests/expected_output/de/translate-partial View 1 2 1 chunk +5 lines, -0 lines 0 comments Download
A tests/expected_output/de/translate-template View 1 1 chunk +15 lines, -0 lines 0 comments Download
A tests/expected_output/de/translate-tmpl View 1 2 1 chunk +17 lines, -0 lines 0 comments Download
M tests/expected_output/en/sitemap View 1 2 1 chunk +13 lines, -1 line 0 comments Download
M tests/expected_output/en/translate View 1 chunk +8 lines, -1 line 0 comments Download
A tests/expected_output/en/translate-html View 1 1 chunk +19 lines, -0 lines 0 comments Download
A tests/expected_output/en/translate-include View 1 1 chunk +16 lines, -0 lines 0 comments Download
A tests/expected_output/en/translate-template View 1 1 chunk +15 lines, -0 lines 0 comments Download
A tests/expected_output/en/translate-tmpl View 1 2 1 chunk +17 lines, -0 lines 0 comments Download
M tests/test_page_outputs.py View 1 2 1 chunk +5 lines, -2 lines 4 comments Download
A tests/test_site/includes/included-translations.html View 1 1 chunk +15 lines, -0 lines 0 comments Download
M tests/test_site/locales/de/translate.json View 1 chunk +26 lines, -1 line 0 comments Download
A tests/test_site/locales/de/translate-not-enough.json View 1 2 1 chunk +7 lines, -0 lines 0 comments Download
A tests/test_site/locales/en/translate.json View 1 2 1 chunk +6 lines, -0 lines 0 comments Download
M tests/test_site/pages/sitemap.tmpl View 1 1 chunk +2 lines, -2 lines 0 comments Download
M tests/test_site/pages/translate.md View 1 chunk +15 lines, -1 line 0 comments Download
A tests/test_site/pages/translate-html.html View 1 1 chunk +21 lines, -0 lines 0 comments Download
A tests/test_site/pages/translate-include.md View 1 1 chunk +5 lines, -0 lines 0 comments Download
A tests/test_site/pages/translate-not-enough.md View 1 2 1 chunk +8 lines, -0 lines 0 comments Download
A tests/test_site/pages/translate-partial.md View 1 2 1 chunk +6 lines, -0 lines 0 comments Download
A tests/test_site/pages/translate-template.md View 1 1 chunk +3 lines, -0 lines 0 comments Download
A tests/test_site/pages/translate-tmpl.tmpl View 1 2 1 chunk +19 lines, -0 lines 0 comments Download
M tests/test_site/settings.ini View 1 2 1 chunk +7 lines, -1 line 0 comments Download
A tests/test_site/templates/translatable-template.tmpl View 1 1 chunk +15 lines, -0 lines 0 comments Download
M tests/test_translations.py View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 6
Vasily Kuznetsov
Hey Jon, I got the .md part done here and it covers all scenarios from ...
Jan. 8, 2018, 5:39 p.m. (2018-01-08 17:39:19 UTC) #1
Vasily Kuznetsov
Hi Jon, Here's a final version of this patch. Now translations are tested quite well. ...
Jan. 12, 2018, 7:56 p.m. (2018-01-12 19:56:50 UTC) #2
Jon Sonesen
Hey Vasily, Thanks for adding more coverage and having the test pages be a bit ...
Jan. 19, 2018, 4:45 a.m. (2018-01-19 04:45:37 UTC) #3
Vasily Kuznetsov
Here we go, some more stuff covered. Don't worry that it's a lot of files, ...
Jan. 19, 2018, 3:34 p.m. (2018-01-19 15:34:29 UTC) #4
Jon Sonesen
On 2018/01/19 15:34:29, Vasily Kuznetsov wrote: > Here we go, some more stuff covered. Don't ...
Jan. 19, 2018, 7:25 p.m. (2018-01-19 19:25:25 UTC) #5
Jon Sonesen
Jan. 19, 2018, 7:25 p.m. (2018-01-19 19:25:35 UTC) #6
https://codereview.adblockplus.org/29659605/diff/29674728/tests/test_page_out...
File tests/test_page_outputs.py (right):

https://codereview.adblockplus.org/29659605/diff/29674728/tests/test_page_out...
tests/test_page_outputs.py:58: if expected_output.startswith('## MISSING'):
On 2018/01/19 15:34:29, Vasily Kuznetsov wrote:
> This allows us to check that a certain file _is_not_ generated.

Acknowledged.

https://codereview.adblockplus.org/29659605/diff/29674728/tests/test_page_out...
tests/test_page_outputs.py:67: assert expected_output == response.read().strip()
On 2018/01/19 15:34:29, Vasily Kuznetsov wrote:
> I changed the order of arguments in a comparison to make the diffs in error
> messages look more natural.

Acknowledged.

Powered by Google App Engine
This is Rietveld