The script takes options now: --revision, --minimum, --update and
--credits-file. The po files can still be given as arguments, they default to
all of them.
--update merges the generated entries into the Translators section of the
credits file instead of printing them, so the list can be refreshed without
editing by hand. The merge only ever adds: the entries the file already has are
kept as they are and in their order, and a generated entry is skipped when the
file already credits that address or that name, so a second run changes
nothing.
Sections the file does not have are inserted alphabetically, and the names the
po files use for a section the file names otherwise are mapped: Chinese
(Simplified Han script) to Chinese (China), Chinese (Traditional) to Chinese
(Taiwan), Khmer (Central) to Khmer. A name that only differs by a parenthetical
is matched on its base name. Only the Translators section is touched, the
"Documentation translators" list below it has its own source.
This is what makes the file maintainable without hand work, but it keeps the
hand-curated entries safe: the po files start in 2010, so a regeneration cannot
see the translators of the language files of the earlier versions, and Daniel
Hinostroza is one of them.
The tooling accounts are filtered out, and an account registered under a
placeholder name keeps the address alone, which is the Weblate account that
translated Croatian as "test".
Fixes the shellcheck findings so the script passes the shellcheck workflow:
the environment is read under set -u, the paths are quoted, and the usage text
is a single heredoc instead of being duplicated in the option parser.
Co-authored-by: DeepSeek <noreply@deepseek.com>
Signed-off-by: William Desportes <williamdes@wdes.fr>
git shortlog was called without a revision, so it read the commits from
stdin instead of walking the history, and it came back empty whenever
stdin was not a terminal, that is from cron or from a hook. It needs an
explicit revision, HEAD by default.
The grep on its output also kept only the authors with four digit commit
counts, which is at most one person per language, and the entries were
printed bare, without the indentation or the escaping the credits file
expects.
The script now takes the revision, a minimum number of commits and an
optional po file, skips the tooling accounts, and writes the entries
indented and escaped, ready to be curated into the credits.
The po directory is detected instead of hardcoded, so the same script
works on the branch that moved it to resources/po.
Note that no revision can list the translators of the language files that
predate the 2010 po generation, those have to be curated by hand, from the
ChangeLog and the commit messages.
Co-authored-by: DeepSeek <noreply@deepseek.com>
Signed-off-by: William Desportes <williamdes@wdes.fr>
"Deleted User <noreply@weblate.org>" is what Weblate renames a closed account
to. It sits in the Romanian section of the 5.x credits and lists nobody, so it
goes, and SKIPPED_ACCOUNTS in scripts/locales-contributors now filters the
noreply addresses so a regeneration does not bring it back.
Co-authored-by: DeepSeek <noreply@deepseek.com>
Signed-off-by: William Desportes <williamdes@wdes.fr>
Daniel Hinostroza reported to us in 2023 that he was missing from the
translators list.
He translated the Spanish version from (at least) 2.3.0 through 3.1.5.
So far only 6.0 lists him (9af1d3d222), this branch was left out.
The po files cannot vouch for him, they were generated in 2010: he only
shows up in the commit messages and the ChangeLog of that era, in
ca19a3319d for 2.3.0, ef06c542d4 and 20cd12381a for the 2007 updates, and
through the Spanish updates listed by the 3.1.5 and 3.2.0 ChangeLogs.
Reported-by: Daniel Hinostroza <dhinostroza@gmail.com>
Co-authored-by: DeepSeek <noreply@deepseek.com>
Signed-off-by: William Desportes <williamdes@wdes.fr>
Since b15ac62d94 the release kits ship the generated documentation in
public/docs/html, but getDocumentationLink() still looked for
docs/html/index.html in the root directory. The check never matched, so
all documentation links pointed to docs.phpmyadmin.net even when the
documentation was included.
Signed-off-by: Магда М.Г. <mail@mgmagda.ru>
This avoids the following server error:
1577 - Cannot proceed, because event scheduler is disabled
Signed-off-by: Maurício Meneghini Fauth <mauricio@mfauth.com.br>