Damien Elmes
0217cff099
add some comments to card-template-rendering.ftl
2020-02-17 09:06:54 +10:00
Damien Elmes
6e3f1d2e26
Revert "test out the Python Fluent implementation"
...
This reverts commit 181c17a0988cf9e57b2604746000c6072cb96206.
Reverting this to keep as a record.
2020-02-17 08:40:17 +10:00
Damien Elmes
8abb35372a
test out the Python Fluent implementation
...
The parsing step is considerably slower in Python, but if parsing
is moved out of the test function, Python wins at 45ms to Rust's 67ms
on 10,000 rounds, presumably due to the overhead of serializing to
Protobuf. Not enough of a difference to justify the inclusion of extra
dependencies and duplicating the lookup code in any case.
2020-02-17 08:40:17 +10:00
Damien Elmes
c395003def
expose translations to Python
2020-02-17 08:40:17 +10:00
Damien Elmes
4fe47b7be4
cache i18n categories
2020-02-17 08:40:17 +10:00
Damien Elmes
9247e5de7d
don't hard-code available ftl languages
...
Instead of trying to define which languages we support, just check
if an appropriate folder is available on disk. This allows users
to drop their own translations into the locale folder and have things
just work.
2020-02-17 08:40:17 +10:00
Damien Elmes
8cd76bee92
wrap i18n struct in a shared mutex so we can start caching
2020-02-17 08:40:17 +10:00
Damien Elmes
f6a881f950
pass progress back as translated string(s)
2020-02-17 08:40:17 +10:00
Damien Elmes
d1e587fca9
add ftl to the build process, and a sync-git script
...
also
- ensure po files are checked when updated
- add start of sync.ftl
2020-02-17 08:40:17 +10:00
Damien Elmes
6c9e9eb330
drop unused threadLocal and noHint i18n code
2020-02-17 08:40:17 +10:00
Damien Elmes
97b9b94fc7
use new file locations for translations
...
- translation files are now stored in a separate repo, and
use a layout compatible with Pontoon
- normalize the language code in aqt, so that old config settings
and command line arguments are correctly handled
- store Qt and gettext translations in separate subfolders
- remove Crowdin scripts
2020-02-17 08:40:17 +10:00
Damien Elmes
1efe9e525c
move Gettext translations into separate repo for Pontoon
2020-02-17 08:40:17 +10:00
Damien Elmes
64445f17df
update translations
2020-02-17 08:40:17 +10:00
Damien Elmes
cc99f221be
expose StringsGroup enum in protobuf
2020-02-17 08:40:17 +10:00
Damien Elmes
61b9f70ab9
bump version
2020-02-17 08:40:17 +10:00
Damien Elmes
f6ddcd81df
fix sync deauth
2020-02-17 08:40:17 +10:00
Damien Elmes
319390f0c6
more frequent progress updates
2020-02-17 08:40:17 +10:00
Damien Elmes
7d68da2b57
pass locale details to backend
2020-02-17 08:40:17 +10:00
Damien Elmes
fe874e9909
fix Lojban selection
2020-02-17 08:40:17 +10:00
Damien Elmes
b8e516b47c
rename card-templates.ftl
2020-02-17 08:40:17 +10:00
Damien Elmes
0cc1938657
move empty card check into template code
2020-02-17 08:40:17 +10:00
Damien Elmes
33367c8edf
make template errors translatable
2020-02-17 08:40:17 +10:00
Damien Elmes
5c8e3df612
include report in MediaCheckOutput
2020-02-17 08:40:17 +10:00
Damien Elmes
dc9362d4ed
add i18n support to Rust code using Fluent
2020-02-17 08:40:17 +10:00
Damien Elmes
ee27711b65
remove redundant test_ prefix
2020-02-17 08:40:17 +10:00
Damien Elmes
23483b0a57
mark deletions in media DB when files are deleted
2020-02-17 08:40:17 +10:00
Damien Elmes
1b0e8485fd
ignore errors when file to delete is already gone
...
May be marked as pending upload or in media check screen, then removed
by user.
2020-02-17 08:40:17 +10:00
Damien Elmes
df201c164f
make sure we don't leave a trailing dot or space when truncating
2020-02-17 08:40:17 +10:00
Damien Elmes
1ff6cbc54d
make sure renames generated during sync don't get immediately removed
2020-02-17 08:40:17 +10:00
Damien Elmes
d394aed5fd
don't filter out invalid filenames when we're sending them as a deletion
2020-02-17 08:40:17 +10:00
Damien Elmes
44a1a5f987
fix the wrong named being returned when renaming in sync
2020-02-17 08:40:17 +10:00
Damien Elmes
6240bd613d
update media DB when adding LaTeX images
2020-02-17 08:40:17 +10:00
Damien Elmes
c3f22364c9
pt->pb for consistency with rsbackend.py
2020-02-17 08:40:17 +10:00
Damien Elmes
d73fec3280
shorten add_file_to_media_folder
2020-02-17 08:40:17 +10:00
Damien Elmes
4c0f216df2
use media.trash for unused media deletion as well
2020-02-17 08:40:17 +10:00
Damien Elmes
4fc898ec1e
accept clicks on the progress dialog close button when updating
2020-02-17 08:40:17 +10:00
Damien Elmes
0c27126817
fix latex render progress; display more frequently
2020-02-17 08:40:17 +10:00
Damien Elmes
49cda5ffbb
rename aqt/media.py to mediacheck.py
2020-02-17 08:40:17 +10:00
Damien Elmes
2d0499580f
if latex fails to render in bulk, show the user the problem
2020-02-17 08:40:17 +10:00
Damien Elmes
9df2a08cb0
new render_all_latex() + gui button; remove some old code
2020-02-17 08:40:17 +10:00
Damien Elmes
7f365faf3f
add extract_latex to backend; use it for latex build
2020-02-17 08:40:17 +10:00
Damien Elmes
79c1732b00
stripLatex() does not appear to be used anywhere
2020-02-17 08:40:17 +10:00
Damien Elmes
c890ef871e
include LaTeX png/svg files when checking for unused media
2020-02-17 08:40:17 +10:00
Damien Elmes
4cca3ecef5
files with leading underscore are ignored
2020-02-17 08:40:17 +10:00
Damien Elmes
9913dcd5dc
include normalized filenames in the rename list
...
Since they'll need to be uploaded on the next sync, better not to
hide them from the list
2020-02-17 08:40:17 +10:00
Damien Elmes
c347c9aee8
sort media list
2020-02-17 08:40:17 +10:00
Damien Elmes
6f158c8555
plug new media check in
2020-02-17 08:40:17 +10:00
Damien Elmes
c1939aebd1
when adding hash suffix, need length in hex, not bytes
2020-02-17 08:40:17 +10:00
Damien Elmes
fabfcb0338
gather field references in Rust; media check now mostly complete
2020-02-17 08:40:17 +10:00
Damien Elmes
aa832e9117
backend stores media folder/db locations; don't need to pass them in
2020-02-17 08:40:17 +10:00