Граф коммитов

231 Коммитов

Автор SHA1 Сообщение Дата
Paul McLanahan a007ca2876 Update pot_to_langfiles function to use default lang files.
Was using old defaults instead of the list from settings.
Also should not skip untranslated since it's reading from
templates.
2013-09-05 14:07:43 -04:00
Paul McLanahan fda1ef09a3 Bug 891835: Improve test coverage of gettext.py module. 2013-09-05 11:40:08 -04:00
pascalc 384982b345 Bug 891835 : extract comments in pot files into lang files
* gettext.py/pot_to_langfiles() updated to extract comments from pot file to templates/*.lang files
* gettext.py/_append_to_lang_file() now outputs comments if they exist
* dotlang.py/parse() has a new optional parameter: extract_comments=False
* l10n_merge uses extract_comments=True
* updated test_merge_lang_file()
* added test_parse_with_comments()
* all tests pass
2013-09-05 11:40:08 -04:00
Kohei Yoshino a4f8f3e823 Bug 903886 - Expose canonical and alternate URLs on Bedrock views 2013-08-29 18:20:39 -04:00
Hector Zhao 60252c0ad1 Bug 903216: Some l10n pages show {OK} from *.lang files 2013-08-15 22:38:15 +08:00
Dan Poirier 2720952a6e Bug 868178 - Make L10N translator comment tag case-insensitive
* Update playdoh-lib to version that has that change in tower
* Fix one tower import due to a method having been moved
2013-08-02 14:19:39 -04:00
Dan Poirier d3836c1651 Bug 873087 - Generalized lang file tags
Support for lines like '## tag ##' in lang files, where tag can be any string.
For efficiency, tag lines must be the first lines in the file.
2013-08-02 11:03:23 -04:00
Hector Zhao 8f7dabd14a Bug 816080: Upgrade Bedrock to latest Playdoh 2013-05-15 11:14:13 -07:00
pascalc 1589f92b18 Fix bug 869538: append to lang files with unicode strings 2013-05-08 10:44:30 -04:00
Paul McLanahan 210e305921 Merge pull request #791 from dpoirier/856919-no-locale-in-request
Bug 856919 - Fix request.locale attribute error
2013-05-02 08:07:14 -07:00
Dan Poirier 5186169494 Bug 856919 - Fix request.locale attribute error
Getting an AttributeError from request.locale on the 500
error handler path. Check for .locale before referencing it.
2013-05-02 10:50:02 -04:00
Paul McLanahan 1f1dcf79af Stop unnecessary calls to cache for default lang l10n. 2013-04-29 15:20:16 -04:00
Paul McLanahan 8bcca89ccf Bug 861168: Fix regression in l10n_merge command. 2013-04-26 11:55:41 -04:00
Paul McLanahan af1a443a30 Merge pull request #687 from pascalchevrel/Bug851545-download_button_default_lang_file
replace call to base.lang by call to download_button.lang
2013-03-18 09:26:15 -07:00
pascalc 965454e4b2 replace call to base.lang by call to download_button.lang in base.py + replace references to base.lang in test files by references to download_button.lang for consistency 2013-03-15 17:49:34 +01:00
Paul McLanahan 45f2f0088b Bug 774239: Add ability to extract specific files to l10n_extract command.
Update l10n_extract docs.
2013-03-15 11:59:05 -04:00
Paul McLanahan acc9a55e0c Merge pull request #543 from pascalchevrel/Bug-8823024-langfiles-removeBOM
Bug 823024 - template lang files with ## active ## tag are not activated...
2013-03-07 08:57:59 -08:00
pascalc 05ec986523 remove template file not used by the test 2013-03-05 19:31:19 +01:00
pascalc 338335de45 add a test 2013-03-05 11:25:12 +01:00
Paul McLanahan d2d63217b1 Bug 775542: Prevent templates from overriding with default langfiles.
The base templates had specified "main" in a "set_lang_files"
tag. This was causing child templates to look in "main.lang"
before the lang file for the template. This removes those
errant calls, as well as prevents such accidental additions
from breaking things in future.
2013-02-15 14:27:37 -05:00
Paul McLanahan 620336258c Bug 775542: Query lang files in the proper order.
Skip non-translated lang file entries.
Fix bug 815573.
2013-02-12 15:15:55 -05:00
Paul McLanahan 872e98b11e Bug 774234: Add tests for l10n blocks and langs support.
Refactor template handling and parsing.
2013-02-04 11:58:05 -05:00
Kushal Das 106ba2120f Bug 774234: we can now define per locale l10n blocks
The blocks can be any of these 3 style:

{% l10n whatsnew_feature locales=ru,bn-IN 20120712 %}
{% l10n whatsnew_feature 20120712 %}
{% l10n whatsnew_feature, 20120712 %}

For the First example we will have templates in the given two
languages.
2nd and 3rd example, we will have the templates for all locales.
2013-01-30 15:15:01 -05:00
Michael Kelly 6a84f64f2e Fix Bug 823908: Preserve locale for tabzilla redirects.
- Ensures that if a locale is used with the old tabzilla URL it will 
  keep that locale through the redirect.
- Fixes a test that assumed the en-US locale was activated (and broke
  as a result of the tabzilla test activating a different one).
2013-01-02 13:31:11 -05:00
pascalc 04e2abe282 Bug 823024 - template lang files with ## active ## tag are not activated if the file has a unicode BOM 2012-12-19 13:41:12 +01:00
Steven Garrity b086b4a9d5 Bug 808762: Port firefox/all/ page to bedrock.
New design for page.
2012-12-18 12:52:26 -05:00
Paul McLanahan d1b9805bf1 Bug 821330: Fix translations on contribute page.
* Fix gettext lazy to be able to find additional lang files specified in
  python modules.
* Mark all translated strings a safe so that html entities aren't
  escaped.
* Add `lang_files` kwarg to _() and _lazy() for searching alternate
  lang files for only that string. This will _NOT_ alter extraction.
2012-12-14 11:45:30 -05:00
Anthony Ricaud 641ead0734 Import Tabzilla into Bedrock
- Make it localisable
- Add redirects for backwards compatibility
- Adds a js_escape filter

bug 744271
2012-12-11 16:03:05 +01:00
Anthony Ricaud 66bc94b6b4 Fix Python coding declaration after adding MPL2 license 2012-11-28 18:34:39 +01:00
Gervase Markham 0cc8e6cd35 Update license to MPL 2. 2012-11-28 18:26:46 +01:00
Anthony Ricaud dc6e5a6c81 jingo.render is deprecated in recent versions of jingo
bug 816080
2012-11-28 17:01:24 +01:00
Anthony Ricaud 506a96d010 Disable a failing test.
bug 815573
2012-11-27 11:56:10 +01:00
Paul McLanahan 43d591c4c2 Fix tests to pass with DEV=False 2012-11-26 10:12:48 -05:00
Paul McLanahan 1e08138bfc Merge branch 'bug-794059-activate-pages-per-locale' 2012-11-26 08:57:16 -05:00
Paul McLanahan 30130c5338 Bug 809857: Add full path to lang file to error emails. 2012-11-23 15:01:24 +01:00
Paul McLanahan 35cefae690 Allow pages to be activated per locale.
Fix bug 794059.
2012-11-21 15:04:46 -05:00
Paul McLanahan b26f3312f6 Correctly install gettext into Jinja2. Fix bug 808580. 2012-11-06 13:56:29 -05:00
Anthony Ricaud 02c535fc64 Compare independently of the order
Also improves the error message received
fix bug 807383
2012-10-31 20:11:00 +01:00
Paul McLanahan c624023524 Use SkipTest from nose as skip is only in Py 2.7+.
bug 783202.
2012-10-25 11:14:47 -04:00
Paul McLanahan e3a5eae625 Add ability to specify lang files in python src.
* Fix bug 783202.
* Update docs.
2012-10-25 16:37:55 +02:00
Anthony Ricaud a7d735dba3 Merge branch 'contribute'
Conflicts:
	apps/mozorg/forms.py
	apps/mozorg/templates/mozorg/contribute-form.html
	apps/mozorg/templates/mozorg/contribute.html
	apps/mozorg/views.py
	media/js/contribute-page.js
	settings/base.py
2012-09-21 17:25:18 +02:00
Anthony Ricaud 49eb561348 Use a list instead of a set literal
(they don't exist on Python 2.6)

bug 763913
2012-09-06 16:45:31 +02:00
Paul McLanahan 5347403198 Apply the same tweaks during translation as extraction.
Fix bug 763913.
2012-09-06 16:27:36 +02:00
Anthony Ricaud d41980b08d Update "Want to help?" form to support additional languages
fix bug 756093

- Move logic to email_contribute.py
- Refactored data structures to conform a bit more to DRY
- Remove newsletter options on non 'en' locales (fix bug 770606)
- Tests ! (fix bug 780911)
- Email backend in DEV environments writes to the console to avoid
unnecessary email sending
- PEP8 cleanups
- Fixes a dotlang test that depended on en-US
2012-08-28 14:38:14 +02:00
Giorgos Logiotatidis 30eec568cb [fix bug 774232] Parse .txt for l10n blocks.
- Allow l10n_check command to parse txt files.

- Moved mozorg/templates/emails to mozorg/templates/mozorg/emails so
  parser can find the files.

- Cleanup documentation in mozorg/views.py
2012-08-08 17:50:08 +02:00
Anthony Ricaud e55dabf0cf Detect string formatting issues
- Fallback to original string
- Mail managers

fix bug 775557
2012-08-07 18:11:38 +02:00
Anthony Ricaud 2988e08eaf Don't fail on decoding errors.
fix bug 775264
2012-08-07 11:35:50 +02:00
Anthony Ricaud fcdc18b7c6 Bug 775406 - Validate the newsletter id
newsletter becomes a FormField
2012-08-01 23:15:27 +02:00
Anthony Ricaud 45435c143e Bug 760570 - Copy the DOTLANG_FILES settings instead before appending to it
Without this, the DOTLANG_FILES setting would grow with each request.
2012-07-23 19:30:25 +02:00
Anthony Ricaud 4373a22276 Dotlang parser should ignore commented lines
- PEP8 fixes
- Rewrote parse() a bit to remove an indentation level
- Move existing tests to a directory
- Add one test for the parser
2012-07-17 01:31:07 +02:00
Anthony Ricaud d2f9517a10 Only parse .lang files if the cache is empty.
Before this, it would also parse when we cached an empty dict.
2012-07-16 16:28:09 +02:00
Anthony Ricaud cfb37582b0 Test another template because channel.html disappeared in d8921e105b 2012-07-06 16:31:27 +02:00
James Long 7faab4efc9 update l10n tests to use the "was" block instead of "else" 2012-05-31 15:33:59 +02:00
Anthony Ricaud bd0ba83456 Fix the testsuite so that it's possible to run tests. 2012-05-31 15:33:26 +02:00
James Long db01c61e8f polish l10n blocks, rewrite docs 2012-05-25 11:21:02 -04:00
James Long d77df47bb5 tweak workflow for l10n 2012-04-27 15:49:30 -04:00
James Long fe7aa37c0d fix problem with djanog forcing locales to lowercase 2012-04-17 11:19:41 -04:00
James Long 64a8c551e9 make .lang library case-sensitive 2012-04-16 14:13:19 -04:00
James Long 04cb7a8d3c strip {ok} and other tags off l10n strings 2012-04-16 13:32:57 -04:00
James Long 994aae3845 refactor .lang system, less hacky and more sleeky 2012-04-13 18:56:59 -04:00
James Long 6a83042136 tweaks to l10n stuff from wenzel r? 2012-04-11 15:56:56 -04:00
James Long d680df97cc finalize .lang functionality, provide set_lang_files and add_lang_files template blocks 2012-04-11 14:46:05 -04:00
James Long 44ae5f419a merge l10n branch 2012-04-11 00:57:53 -04:00
James Long e3c369bb44 implement more .lang utilities, extracting/merging 2012-04-11 00:44:22 -04:00
James Long d9f54b132f fix bug in l10n_utils helper 2012-04-06 15:36:34 -04:00
James Long 1952dd91af better y/n checking 2012-04-05 16:31:12 -04:00
James Long 08430fa0cc move dotlang lib into l10n_utils and write l10n_extract command 2012-04-02 13:59:19 -05:00
James Long 619f138aff a few tweaks to the l10n_check command, renamed else to was 2012-03-21 17:25:35 -04:00
Fred Wenzel 40e8e338b0 Merge branch 'master' of github.com:mozilla/bedrock 2012-02-24 15:29:50 -08:00
James Long 8a137d7e97 make l10n_check command only output l10n template if blocks exist 2011-12-14 15:52:13 -05:00
Fred Wenzel e0f9b6f358 PEP8ification and stuff. 2011-12-12 14:44:09 -08:00
James Long 848da29e25 add locale folder until we get it in SVN 2011-12-07 12:53:31 -08:00
James Long d308933633 add tests of l10n parser and finalize how it writes out the templates 2011-12-02 15:51:22 -05:00
James Long 4c6c41a107 refactor l10n_command to keep content outside of l10n blocks 2011-12-01 18:32:11 -05:00
James Long 73f9147947 update docs, remove unused -t argument to l10n_check command 2011-09-19 17:33:44 -04:00
James Long f984637ba9 rewrite l10n_check command to generate locale files with else statements 2011-09-19 12:05:50 -04:00
Fred Wenzel c660832f75 Added an else clause to l10n blocks. 2011-08-31 15:37:52 -07:00
James Long 7f9b81ed21 code cleanup 2011-05-25 18:24:56 -07:00
James Long bd159e03f5 move localized templates into locale directory, enhance l10n_check command 2011-05-25 00:10:20 -07:00
James Long 2b1ddf633f move l10n_check command to lib/l10n_utils 2011-05-24 14:41:40 -07:00
Fred Wenzel 306e0e5164 Initial implementation of l10n block type with jingo-like render shortcut. 2011-04-29 13:51:50 -07:00