Commit graph

378 commits

Author SHA1 Message Date
Damien Elmes
7d691d7571 don't abort build if mo file fails; rename files for consistency
Issues are now checked for in CI, so there's no need to break the
build for everyone each time there's a problem with the gettext
catalogs.
2020-02-26 17:47:02 +10:00
Damien Elmes
8b728b4a1e fix dark mode target Qt version 2020-02-26 16:53:35 +10:00
Damien Elmes
94ba217c25 formatting fixes 2020-02-25 17:56:46 +10:00
Damien Elmes
5ca00fc92d interrupt current audio when autoplay off 2020-02-25 17:49:06 +10:00
Damien Elmes
c240690da7 ensure user doesn't try to export into data folder
https://anki.tenderapp.com/discussions/ankidesktop/39008-export-path-accidentally-set-to-collectionmedia-possible-damage
2020-02-25 17:38:49 +10:00
Damien Elmes
c172557e47 formatting fix 2020-02-25 17:29:10 +10:00
Damien Elmes
59328d9ade tweak rounding
- avoid rounding minutes
- round the seconds taken in the card info screen
- provide different precise and imprecise modes, since we need
to display seconds to multiple decimals in some areas
2020-02-25 17:29:06 +10:00
Damien Elmes
fa41f24bf6 fix display of 1+ day intervals in review history
https://anki.tenderapp.com/discussions/ankidesktop/39189-interval-field-of-card-info-display-wrong-unit
2020-02-25 17:00:02 +10:00
Damien Elmes
999aa74eb2 ensure Anki starts on Windows systems that don't have TTS installed 2020-02-25 16:25:17 +10:00
Damien Elmes
8efc23229c don't allow UI scale < 100%
Both Windows and Linux installs fail to render properly when the scale
is below 100%:

https://anki.tenderapp.com/discussions/ankidesktop/38909-user-interface-size

Retina Macs do render properly, but they tend to display at appropriate
size out of the box anyway.
2020-02-25 16:20:14 +10:00
Damien Elmes
9aa23c4846 don't pick up system dark theme in -alternate Mac build
The older Qt doesn't support it properly
2020-02-25 15:46:39 +10:00
Damien Elmes
592741deaa change default night mode card background to dark grey 2020-02-25 15:43:56 +10:00
Damien Elmes
d8695b215f use -q instead of --for-msgfmt so older gettext versions don't break
I was mainly using it to keep the output tidy anyway
2020-02-25 13:52:40 +10:00
Damien Elmes
d26a68f20e Merge pull request #458 from glutanimate/add-deck-conf-hooks
Add deck options hooks
2020-02-25 13:38:04 +10:00
evandrocoan
5fab701431 Added -o pipefail to all set -e ensuring the build fails when some
operation with pipe exits error status.

# Conflicts:
#	Makefile
2020-02-24 20:18:56 -03:00
evandrocoan
6a70adf6f4 Fixed msgmerge not stopping the shell on error 2020-02-24 17:54:59 -03:00
evandrocoan
a3e2793e25 Fixed build-mo-files not stopping on build errors 2020-02-24 17:02:27 -03:00
Glutanimate
f7b256a860 Use a consistent function signature across load and save hooks 2020-02-24 15:47:48 +01:00
Glutanimate
d1dc0362b6 Add deck_conf_did_setup_ui_form hook
Called earlier than deck_conf_will_show, allowing add-on authors
to perform UI modifications before the deck config is loaded.
2020-02-24 15:29:23 +01:00
Glutanimate
368a485847 Add hooks for extending the deck options dialog
Introduces three new hooks:

* deck_conf_will_show: Allows adding or modifying widgets
* deck_conf_did_load_config: Allows add-on widgets to read from config
* deck_conf_will_save_config: Allows add-on widgets to write to config
2020-02-24 13:42:30 +01:00
Damien Elmes
43dae5c90e Merge pull request #456 from Arthur-Milchior/noDefaultDeckInBrowser
No default deck in browser
2020-02-24 19:35:49 +10:00
Damien Elmes
db486dd25c enable v2 apkg export 2020-02-24 18:54:55 +10:00
Damien Elmes
0e6b584483 fix tr() 2020-02-24 18:37:02 +10:00
Damien Elmes
d085fcea64 add Tobias to contributors
if anyone else is reading this and thinks they should be on the list,
please let me know!
2020-02-24 18:36:37 +10:00
Damien Elmes
087afc94d8 merge po with pot before building mo
fixes errors in strings that have been removed from the template
2020-02-24 15:35:52 +10:00
Damien Elmes
70ae99778f remove old fmtTimeSpan() and associated strings 2020-02-23 18:47:16 +10:00
Damien Elmes
f710e58cee check-po-files moved into i18n repo 2020-02-23 18:33:03 +10:00
Damien Elmes
1c69747b5a move the big error message into FTL
this works around the issue Pontoon has with saving translations with
trailing newlines, and makes it easier for translators to update in
the future, as the errors are now using markdown
2020-02-23 18:01:34 +10:00
Damien Elmes
024126b3be support aqt-specific FTL files 2020-02-23 18:00:13 +10:00
Damien Elmes
d270a01b61 update extract-po-string
- use fluent.syntax for output (only non-plural case for now)
- add confirmation step
2020-02-23 17:58:43 +10:00
Damien Elmes
c98247fa0f translations no longer require an open collection 2020-02-23 14:57:02 +10:00
Damien Elmes
0d1a30c6d8 rework Fluent handling
- all .ftl files for a language are concatenated into a single file
at build time
- all languages are included in the binary
- external ftl files placed in the ftl folder can override the
built-in definitions
- constants are automatically generated for each string key
- dropped the separate StringsGroup enum
2020-02-23 13:22:50 +10:00
Arthur Milchior
adfbd0d70f should(default)deckbedisplayed in snake case 2020-02-22 04:08:01 -08:00
Arthur Milchior
6a50730f0d Remove options for all/allNames
Instead, we always see default deck if it has a child
As indicated in https://github.com/ankitects/anki/pull/452
2020-02-22 04:03:42 -08:00
Arthur Milchior
89b79d9800 forceDefault to force_default 2020-02-22 04:01:42 -08:00
Damien Elmes
258a8a04f0 fix comment 2020-02-21 20:10:58 +10:00
Damien Elmes
7d4d713c49 remove unused import 2020-02-21 19:58:54 +10:00
Damien Elmes
3a83d9844a add studied_today(), move to statistics.ftl 2020-02-21 18:01:15 +10:00
Damien Elmes
ce84a1a246 don't use implicit $ in extract-po-strings 2020-02-21 17:06:57 +10:00
Damien Elmes
05c20e72e8 split ftl and po syncing scripts 2020-02-21 15:29:38 +10:00
Damien Elmes
8afaaf9c70 simplify interval display in review log 2020-02-21 15:29:38 +10:00
Damien Elmes
ddf1d6acbd add plural support to extract-po-string 2020-02-21 15:29:38 +10:00
Damien Elmes
74bff450e2 add non-abbreviated timespan translation; update existing short=True calls
- drop the '5m3s' special casing done in the card stats screen, and
just use decimals
- change alignment of the review log so that the non-abbreviated
spans are easier to read
2020-02-21 15:29:38 +10:00
Damien Elmes
b0cd1b23f2 support variables when importing from gettext 2020-02-21 15:29:38 +10:00
Damien Elmes
bda7e0e0a4 possible fix for race conditions in the sound code
https://anki.tenderapp.com/discussions/ankidesktop/39030-erro-ao-adicionar-arquivo-de-udio

the lock should at least ensure _process doesn't disappear in the
middle of our logic, and the longer wait should reduce the chances
of .stop() timing out and allowing multiple audio files to play

Not very happy with the current approach, as in the timeout case
you have multiple threads competing to access the same data
2020-02-21 15:14:09 +10:00
Damien Elmes
e98e85a0b8 Revert "Merge pull request #452 from Arthur-Milchior/noDefaultDeckInBrowser"
This reverts commit 56d908cc28, reversing
changes made to c123b5bf95.

More discussion required on https://github.com/ankitects/anki/pull/452
2020-02-21 12:27:39 +10:00
Damien Elmes
a30e4d9313 Merge pull request #448 from glutanimate/top_toolbar_links_hook
Add a hook for adding links to the top toolbar
2020-02-21 12:18:25 +10:00
Damien Elmes
56d908cc28 Merge pull request #452 from Arthur-Milchior/noDefaultDeckInBrowser
No default deck in browser
2020-02-21 12:10:36 +10:00
Glutanimate
4f50f6c669 Refactor ToolbarLink dataclass into create_link arguments
ToolbarLink was more of a vestigial left-over from an interim
implementation. This change simplifies link addition and brings
it closer in line with adding buttons in the editor screen
2020-02-20 18:22:31 +01:00
Glutanimate
8aa7e9e32e Restore gui_hooks changes 2020-02-20 17:05:27 +01:00