Laurent Monin
f2de38c4ee
Use a dict for countries instead of a list, and sort before writing to file
2014-01-16 15:11:50 +01:00
Laurent Monin
d0910b48c9
country_list -> countries
2014-01-16 15:07:36 +01:00
Laurent Monin
7370177307
Use os.path.join() to build path and define it as a variable not a parameter
...
This method will hardly be called for anything else, having it as parameter
is not needed.
2014-01-16 15:06:26 +01:00
Laurent Monin
bdfc0c9eba
Only check if we can open po/countries/countries.pot and simplify code
2014-01-16 15:04:57 +01:00
Laurent Monin
92b1046179
Use _get_option_name() to insert command-line info in countries.py header
...
This way, even if option is renamed, comment will be always up-to-date.
2014-01-13 15:56:12 +01:00
Laurent Monin
b35c57b465
Pass format keyword arguments directly to write_utf8()
...
'{' and '}' were escaped in `header` and `footer` strings
2014-01-13 15:54:33 +01:00
Laurent Monin
88ea157c1f
Add helper _get_option_name() which finds name of the option for current Command
...
Command class has a get_command_name() but it returns the class's name, not the name
of the option as declared in setup cmdclass dict.
2014-01-13 15:51:50 +01:00
Laurent Monin
13952e7fa7
_exit_with_error() -> _exit()
...
Exit with return code and message when needed.
2014-01-13 15:23:00 +01:00
Laurent Monin
f6488c02ff
Modify _exit_with_error() so message is optional
...
The Transifex client itself already has very descriptive error message,
so just use return code in `picard_get_po_files()`
2014-01-13 14:05:42 +01:00
Laurent Monin
4096988398
Pass command as list to subprocess.call()
2014-01-13 13:44:27 +01:00
Laurent Monin
24528a025e
Add notice about new setup.py commands
2014-01-13 02:14:31 +01:00
Laurent Monin
2b5391e770
update_countries doesn't update related translations anymore
...
It just downloads countries.pot as it is all what it is needed to rebuild
countries.py
countries/*.po are updated using the get_po_files command.
2014-01-13 02:14:31 +01:00
Laurent Monin
2e275ca16b
Add an option to get_po_files to override default minimun percentage
...
Update po/README.md so the actual value isn't written, if we change the default value
it will be only at once place.
2014-01-13 02:14:31 +01:00
Laurent Monin
b6a876afed
Force download of all .po files when using get_po_files command
2014-01-13 02:14:31 +01:00
Laurent Monin
7858dbbb0e
Download only countries.pot to regenerate countries.py
2014-01-13 02:14:31 +01:00
Laurent Monin
0a83a2374e
Use list to handle tx pull options
2014-01-13 02:14:31 +01:00
Laurent Monin
9c3f0aee11
Move information about translations to po/README.md
2014-01-13 02:14:31 +01:00
Laurent Monin
683dc64583
Add regen_pot_file command to setup.py
...
It is using Babel's Distutils Integration command `extract_messages`
instead of pybabel command line command.
See: http://babel.pocoo.org/docs/setup/
2014-01-13 02:14:31 +01:00
Laurent Monin
48c5086554
Add helper _exit_with_error() which log and exit with return code
2014-01-13 02:14:31 +01:00
Laurent Monin
c9661b6d4a
Regenerate countries.py from updated countries.pot
2014-01-13 02:14:31 +01:00
Laurent Monin
c9d5ee9c00
Warn if no country code was found, ie. when file format changed.
2014-01-13 02:14:31 +01:00
Laurent Monin
daf608b4c8
Update countries.pot parser since format changed (iso_code -> iso.code)
...
It changed in https://bitbucket.org/metabrainz/musicbrainz-server/pull-request/426/mbs-6373-only-translate-and-extract-area/diff
2014-01-13 02:14:31 +01:00
Laurent Monin
79f50af5f8
Use a constant for common options of tx pull
2014-01-13 02:14:30 +01:00
Laurent Monin
32b1ce3ae6
Add command get_po_files to setup.py
...
It runs tx pull with needed options.
Translations with less than 5% translated are ignored.
2014-01-13 02:14:30 +01:00
Laurent Monin
91949151eb
Build, install and use all available locales
...
Drop the use of UI_LANGUAGES in setup.py which was restricting available translations,
even though translation was available from transifex.
Locales not in UI_LANGUAGES cannot be selected from Picard Advanced UI option,
but will be used if it is set to system default.
2014-01-13 02:14:30 +01:00
Frederik "Freso" S. Olesen
c06fb76e4b
Use ungettext_countries() for translating country names.
2014-01-12 12:15:19 +01:00
Frederik "Freso" S. Olesen
cf8e5f4781
Replace the release countries in const.py with import from countries.py.
2014-01-12 12:15:19 +01:00
Laurent Monin
38928ea302
Add generated picard/countries.py
2014-01-12 12:15:19 +01:00
Laurent Monin
45ca81a086
Add po/countries/countries.pot to git ignore list
...
We don't want this one to be committed to git repo, it is not created
by parsing Picard code.
2014-01-12 12:15:19 +01:00
Laurent Monin
aa22ff5606
Add a update_countries command to setup.py
...
It retrieves countries.pot from transifex and uses it to generated picard/countries.py
2014-01-12 12:15:18 +01:00
Laurent Monin
d2c518e9c4
Add note to NEWS.txt about PICARD-205 being fixed.
2014-01-12 12:14:57 +01:00
Frederik "Freso" S. Olesen
030de12dd6
Build picard-countries.po for enabled languages.
2014-01-12 12:14:57 +01:00
Frederik "Freso" S. Olesen
604569f4be
Set up Transifex to pull the country name translations.
2014-01-12 12:14:57 +01:00
Laurent Monin
427a1e666f
Merge pull request #210 from zas/test_exit_code
...
Ensure setup.py returns non-zero exit code on test failure
2014-01-12 02:18:44 -08:00
Laurent Monin
2be60fae33
Returns exit code 1 if at least one test failed.
...
It should make travis-ci to report test failures when they actually fail.
Ie. build 169.1 has test failures, but build was happily reported as Passed,
this patch should change this.
2014-01-12 11:08:06 +01:00
Laurent Monin
0f9b04324c
Fix AttributeError: 'MetadataBox' object has no attribute 'shrink_columns'
...
shrink_columns() was replaced by resize_columns() in commit 4c64a277cd
2014-01-10 14:52:29 +01:00
Michael Wiencek
4a4c9960a7
Merge pull request #188 from mwiencek/artists-tag
...
Support the Jaikoz 'artists' tag, which stores individual artist names
2014-01-09 12:21:29 -08:00
Michael Wiencek
fbbadc8f9d
Merge branch 'master' into artists-tag
...
Conflicts:
NEWS.txt
2014-01-09 14:21:04 -06:00
Michael Wiencek
3c0e588bbc
Update NEWS.txt
2014-01-09 14:20:10 -06:00
Laurent Monin
9747a46780
Remove extra imports
2014-01-09 15:54:03 +01:00
Laurent Monin
d779fdc8d3
Merge pull request #208 from xlotlu/filenaming
...
updated tests for filename shortening (which now returns relative paths)
2014-01-07 08:16:47 -08:00
Ionuț Ciocîrlan
156aeda8a0
updated tests for filename shortening (which now returns relative paths)
2014-01-07 17:59:50 +02:00
Laurent Monin
08ce08caa2
Merge pull request #187 from zas/picard528
...
PICARD-528: ignore file paths if hidden or excluded by regex
2014-01-06 16:34:06 -08:00
Laurent Monin
8c2628638a
Merge pull request #207 from olea/patch-1
...
Update copyright year in About
2014-01-06 16:31:16 -08:00
Ismael Olea
0d04cbdf8a
Update about.py
...
updated copyright dates
2014-01-06 17:11:27 +01:00
Laurent Monin
cbcbc73408
Update README.md
...
Typo fix
2014-01-06 11:25:27 +01:00
Laurent Monin
3e83308357
Regenerate picard.pot
2014-01-05 14:01:09 +01:00
Laurent Monin
a8fa19588d
Drop useless spaces in button label
...
It is problematic when it comes to i18n and is useless here.
2014-01-05 13:38:03 +01:00
Laurent Monin
f942b71fe6
Merge pull request #206 from xlotlu/filenaming
...
PICARD-540: return relative paths for shortened filenames
2014-01-04 12:59:33 -08:00
Ionuț Ciocîrlan
0a1b97732b
PICARD-540: return relative paths for shortened filenames
2014-01-04 21:43:39 +02:00