Damien Elmes
d612aa0945
localize some error messages
2020-02-17 11:38:22 +10:00
Damien Elmes
67a741958c
use new i18n infrastructure for more media check / media sync strings
2020-02-17 10:18:20 +10:00
Damien Elmes
0217cff099
add some comments to card-template-rendering.ftl
2020-02-17 09:06:54 +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
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
319390f0c6
more frequent progress updates
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
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
7f365faf3f
add extract_latex to backend; use it for latex build
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
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
Damien Elmes
58da7988c3
catch trailing space/period as well
2020-02-17 08:40:17 +10:00
Damien Elmes
5ccdeb46b8
check [ instead of con in unit test, so test works on Windows as well
2020-02-17 08:40:17 +10:00
Damien Elmes
dad8108feb
run the TZ test only on Macs
2020-02-17 08:40:17 +10:00
Damien Elmes
87c73741d0
test shouldn't depend on dentry order
2020-02-17 08:40:17 +10:00
Damien Elmes
314e643140
expire media trash after a week
2020-02-17 08:40:17 +10:00
Damien Elmes
e9f51a694c
use our own trash folder instead of using the system trash
...
the trash crate was invoking external commands on Macs and Linux
which is slow and likely to fall over if a large number of files need
to be deleted at once.
2020-02-17 08:40:17 +10:00
Damien Elmes
660a9bf7ad
tidying
2020-02-17 08:40:17 +10:00
Damien Elmes
3350b4fa69
hold the DB open for the duration of the check
2020-02-17 08:40:17 +10:00
Damien Elmes
cee8d4b789
DB check
...
Working, but should be refactored so media DB not re-opened
each time a file is renamed.
2020-02-17 08:40:17 +10:00
Damien Elmes
8aa2984d04
factor entry code out for later
2020-02-17 08:40:17 +10:00
Damien Elmes
ce241f9756
mgr didn't need to be mutable
2020-02-17 08:40:17 +10:00
Damien Elmes
f7c26724f3
nfc helper
2020-02-17 08:40:17 +10:00
Damien Elmes
933b7a9a34
ignore 0 byte files when picking up changes
2020-02-17 08:40:17 +10:00
Damien Elmes
4fa4a5077c
don't add non-normalized files to media DB
2020-02-17 08:40:17 +10:00
Damien Elmes
22793c8cd6
media table doesn't need rowid
2020-02-17 08:40:17 +10:00