This became necessary now that more providers were added. Providers can
be proritized for certain file types (e.g. .vpy files will always be
opened with VapourSynth), and when the default provider fails on a file,
the user will be notified and be asked to pick an alternative provider.
The CI builds link against XAudio2_9, which isn't available on Windows 8
and lower. As a quick and dirty workaround, this commit ships the
XAudio2 redistributable on those older Windows versions. Simply renaming
the redistributable to XAudio2_9.dll isn't strictly allowed by the
documentation, but it works and is probably an acceptable hack to
support an outdated operating system...
Fixesarch1t3cht/Aegisub#16 .
Replacing all uses of LuaToAssEntry with LuaToTrackedAssEntry
also replaced its use in LuaParseKaraokeData, which would cause a double
free when canceling a script after calling parse_karaoke_data.
Instead, count how many consecutive times the entry has been found to be
unused and delete it once that count exceeds a limit. This will prevent
excessive reallocating of extradata ID's in applications like folding.
This wasn't necessary before since the internal representation of
folds is be checked for consistency after each commit, but after the
switch to extradata fold operations would leave the extradata in an
invalid state. This isn't technically a problem, but it does leave more
extradata entries lying around than necessary, and it can trip up
automation scripts that aren't prepared for inconsistent fold state.
These commands were revamped in 0ef9963 but the default hotkeys were
never updated. The hotkeys were automatically migrated, but resetting
the settings back to defaults would still set invalid settings.
This would cause an assertion failure in functions like lua_for_each
when the given closure throws an error and thus leaves some values on
the stack. This can make Aegisub crash entirely instead of just catching
and reporting the error. Instead, these stack_checks can be done
manually.
While meson already provides the aegisub-update-po target
for this exact purpose, it insists on also running meson’s
aegisub-pot target first, leading to missing translation strings.
This fixes a bunch of misspellings, borked C format strings and
increases translation coverage from 1288/1612 to 1516/1612
where still missing strings mostly don’t exists in wangqr’s build.
Original commit:
98abe53b15
Using make_pot.sh and
msgmerge --no-fuzzy-matching --sort-by-file $i.po aegisub.pot
since meson’s aegisub-pot target are still not covering all
translatable strings yet.
Base POSIX leaves the handling of backslahes in the operand
implementation defined. The XSI extension specifies several
escape sequences, like e.g. \n, which shall be transformed
upon printing.
Current make_pot.sh expects XSI behaviour and indeed e.g.
dash’s echo builtin implements this. echo builtins of other common
shells such as bash however, do not (by default). Avoid this portability
pitfall by just using printf at all relevant places. See:
https://pubs.opengroup.org/onlinepubs/9699919799/utilities/echo.htmlhttps://pubs.opengroup.org/onlinepubs/9699919799/utilities/printf.html
This also allows us to stop substituting each backslash with four
backslashes before piping to maybe_append. This substituion existed
to safely pass backslahes through maybe_append’s two layers of echo.
Also improve quoting. For consistency prefer single-quote quoting over
shell backslash escapes. QUote the unguarded *.lua to ensure it will
continue to work if there happen to be any lua files in the scripts
working directory.
This supersedes commits from wangqr/Aegisub which adjusted quoting and
echo usage to work with different shells. This is more throughout and
doesn't introduce semi-broken intermediate states.
0fbcaea8714aee271d03940181c7bc
(Note the second commit actually didn't manage to achieve the intended
portability, since several echo usages remained and it forgot to adjust
the backslash substitution, which was then fixed in the third commit.)
gettext can deal with AppData (and other XML files)
since version 0.19.6 (2015). We already depend on gettext anyway so
let’s utilise this, to get rid of two build dependencies and simplify
the extraction logic.
This depends on the removal of underscore prefixes
as done in a prior commit.
After this the developer name "Aegisub Group"
is now also treated as a translateable string.
gettext understands desktop files since 0.19 (2014),
so there’s no need for custom grep logic. This change
matches meson’s i18n which also uses gettext for this.
As a side efffect of this some long strings now get
broken into multiple lines (cosmetic only) and some
blank line gaps are normalised by gettext.
Cherry picks: 0e29c8d0e4
With fixups from: e98b7292f1
find may output matching files in any order.
To avoid unnecessary changes between regeneration
sort its output. For C++ sources xgettext’s --sort-by-file
already has an equivalent effect. All other files are already
statically listed in a fixed order.
Adopts part of: 4aee271d03