Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gui: update translations #2442

Merged
merged 4 commits into from
Feb 21, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .tx/config
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[main]
host = https://www.transifex.com

[gridcoin.src-qt-locale-bitcoin-en-ts--development]
file_filter = src/qt/locale/bitcoin_<lang>.xlf
source_file = src/qt/locale/bitcoin_en.xlf
source_lang = en

16 changes: 13 additions & 3 deletions src/Makefile.qt.include
Original file line number Diff line number Diff line change
Expand Up @@ -655,9 +655,19 @@ QT_QM=$(QT_TS:.ts=.qm)

SECONDARY: $(QT_QM)

# translate: $(srcdir)/qt/bitcoinstrings.cpp $(QT_FORMS_UI) $(QT_FORMS_UI) $(BITCOIN_QT_BASE_CPP) qt/bitcoin.cpp $(BITCOIN_QT_WINDOWS_CPP) $(BITCOIN_QT_WALLET_CPP) $(BITCOIN_QT_H) $(GRIDCOIN_MM)
# @test -n $(LUPDATE) || echo "lupdate is required for updating translations"
# $(AM_V_GEN) QT_SELECT=$(QT_SELECT) $(LUPDATE) $^ -locations relative -no-obsolete -ts $(srcdir)/qt/locale/bitcoin_en.ts
$(srcdir)/qt/bitcoinstrings.cpp: FORCE
@test -n $(XGETTEXT) || echo "xgettext is required for updating translations"
$(AM_V_GEN) cd $(srcdir); XGETTEXT=$(XGETTEXT) COPYRIGHT_HOLDERS="$(COPYRIGHT_HOLDERS)" $(PYTHON) ../share/qt/extract_strings_qt.py $(libgridcoin_util_a_SOURCES) gridcoinresearchd.cpp qt/upgradeqt.cpp qt/bitcoin.cpp

# The resulted bitcoin_en.xlf source file should follow Transifex requirements.
# See: https://docs.transifex.com/formats/xliff#how-to-distinguish-between-a-source-file-and-a-translation-file
translate: $(srcdir)/qt/bitcoinstrings.cpp $(QT_FORMS_UI) $(QT_FORMS_UI) $(GRIDCOINRESEARCH_QT_CPP) qt/bitcoin.cpp $(GRIDCOINRESEARCH_QT_H) $(GRIDCOIN_MM)
@test -n $(LUPDATE) || echo "lupdate is required for updating translations"
$(AM_V_GEN) QT_SELECT=$(QT_SELECT) $(LUPDATE) -no-obsolete -I $(srcdir) -locations relative $^ -ts $(srcdir)/qt/locale/bitcoin_en.ts
@test -n $(LCONVERT) || echo "lconvert is required for updating translations"
$(AM_V_GEN) QT_SELECT=$(QT_SELECT) $(LCONVERT) -drop-translations -o $(srcdir)/qt/locale/bitcoin_en.xlf -i $(srcdir)/qt/locale/bitcoin_en.ts
@$(SED) -i.old -e 's|source-language="en" target-language="en"|source-language="en"|' -e '/<target xml:space="preserve"><\/target>/d' $(srcdir)/qt/locale/bitcoin_en.xlf
@rm -f $(srcdir)/qt/locale/bitcoin_en.xlf.old

$(QT_QRC_LOCALE_CPP): $(QT_QRC_LOCALE) $(QT_QM)
@test -f $(RCC)
Expand Down
8 changes: 4 additions & 4 deletions src/qt/bitcoin_locale.qrc
Original file line number Diff line number Diff line change
Expand Up @@ -4,28 +4,28 @@
<file alias="ar">locale/bitcoin_ar.qm</file>
<file alias="be_BY">locale/bitcoin_be_BY.qm</file>
<file alias="bg">locale/bitcoin_bg.qm</file>
<file alias="ca_ES">locale/bitcoin_ca_ES.qm</file>
<file alias="ca">locale/bitcoin_ca.qm</file>
<file alias="ca@valencia">locale/[email protected]</file>
<file alias="ca_ES">locale/bitcoin_ca_ES.qm</file>
<file alias="cs">locale/bitcoin_cs.qm</file>
<file alias="cy">locale/bitcoin_cy.qm</file>
<file alias="da">locale/bitcoin_da.qm</file>
<file alias="de">locale/bitcoin_de.qm</file>
<file alias="el_GR">locale/bitcoin_el_GR.qm</file>
<file alias="en">locale/bitcoin_en.qm</file>
<file alias="eo">locale/bitcoin_eo.qm</file>
<file alias="es">locale/bitcoin_es.qm</file>
<file alias="es_CL">locale/bitcoin_es_CL.qm</file>
<file alias="es_DO">locale/bitcoin_es_DO.qm</file>
<file alias="es_MX">locale/bitcoin_es_MX.qm</file>
<file alias="es">locale/bitcoin_es.qm</file>
<file alias="es_UY">locale/bitcoin_es_UY.qm</file>
<file alias="et">locale/bitcoin_et.qm</file>
<file alias="eu_ES">locale/bitcoin_eu_ES.qm</file>
<file alias="fa_IR">locale/bitcoin_fa_IR.qm</file>
<file alias="fa">locale/bitcoin_fa.qm</file>
<file alias="fa_IR">locale/bitcoin_fa_IR.qm</file>
<file alias="fi">locale/bitcoin_fi.qm</file>
<file alias="fr_CA">locale/bitcoin_fr_CA.qm</file>
<file alias="fr">locale/bitcoin_fr.qm</file>
<file alias="fr_CA">locale/bitcoin_fr_CA.qm</file>
<file alias="gl">locale/bitcoin_gl.qm</file>
<file alias="he">locale/bitcoin_he.qm</file>
<file alias="hi_IN">locale/bitcoin_hi_IN.qm</file>
Expand Down
16 changes: 10 additions & 6 deletions src/qt/bitcoinstrings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#endif
static const char UNUSED *bitcoin_strings[] = {
QT_TRANSLATE_NOOP("bitcoin-core", "None"),
QT_TRANSLATE_NOOP("bitcoin-core", "None"),
QT_TRANSLATE_NOOP("bitcoin-core", "The %s developers"),
QT_TRANSLATE_NOOP("bitcoin-core", ""
"%s, you must set a rpcpassword in the configuration file:\n"
" %s\n"
Expand Down Expand Up @@ -58,6 +58,9 @@ QT_TRANSLATE_NOOP("bitcoin-core", ""
"Error: This transaction requires a transaction fee of at least %s because of "
"its amount, complexity, or use of recently received funds "),
QT_TRANSLATE_NOOP("bitcoin-core", ""
"Error: Unsupported argument -socks found. Setting SOCKS version isn't "
"possible anymore, only SOCKS5 proxies are supported."),
QT_TRANSLATE_NOOP("bitcoin-core", ""
"Failed to download snapshot as mandatory client is available for download."),
QT_TRANSLATE_NOOP("bitcoin-core", ""
"Failure to do so will result in undefined behaviour or failure to start "
Expand Down Expand Up @@ -112,6 +115,7 @@ QT_TRANSLATE_NOOP("bitcoin-core", "Are you sure you want to cancel the snapshot
QT_TRANSLATE_NOOP("bitcoin-core", "Balance too low to create a contract."),
QT_TRANSLATE_NOOP("bitcoin-core", "Balance"),
QT_TRANSLATE_NOOP("bitcoin-core", "Block Version"),
QT_TRANSLATE_NOOP("bitcoin-core", "Block file load progress "),
QT_TRANSLATE_NOOP("bitcoin-core", "Block not in index"),
QT_TRANSLATE_NOOP("bitcoin-core", "Block read failed"),
QT_TRANSLATE_NOOP("bitcoin-core", "Blocks Loaded"),
Expand All @@ -129,7 +133,6 @@ QT_TRANSLATE_NOOP("bitcoin-core", "Cannot write default address"),
QT_TRANSLATE_NOOP("bitcoin-core", "Cannot write to data directory '%s'; check permissions."),
QT_TRANSLATE_NOOP("bitcoin-core", "Click \"Show Details\" to view changes in latest update."),
QT_TRANSLATE_NOOP("bitcoin-core", "Client Version"),
QT_TRANSLATE_NOOP("bitcoin-core", "Could not clean up previous blockchain data."),
QT_TRANSLATE_NOOP("bitcoin-core", "Could not create transaction. See debug.log."),
QT_TRANSLATE_NOOP("bitcoin-core", "Datadir: "),
QT_TRANSLATE_NOOP("bitcoin-core", "Difficulty"),
Expand Down Expand Up @@ -167,7 +170,7 @@ QT_TRANSLATE_NOOP("bitcoin-core", "Gridcoin Update Available"),
QT_TRANSLATE_NOOP("bitcoin-core", "Gridcoin version"),
QT_TRANSLATE_NOOP("bitcoin-core", "Gridcoin"),
QT_TRANSLATE_NOOP("bitcoin-core", "Height"),
QT_TRANSLATE_NOOP("bitcoin-core", "Importing blockchain data file."),
QT_TRANSLATE_NOOP("bitcoin-core", "Importing blockchain data file(s)."),
QT_TRANSLATE_NOOP("bitcoin-core", "Importing bootstrap blockchain data file."),
QT_TRANSLATE_NOOP("bitcoin-core", "Initialization sanity check failed. Gridcoin is shutting down."),
QT_TRANSLATE_NOOP("bitcoin-core", "Initializing beacon registry from stored history..."),
Expand Down Expand Up @@ -228,14 +231,16 @@ QT_TRANSLATE_NOOP("bitcoin-core", "Poll only allows a single choice."),
QT_TRANSLATE_NOOP("bitcoin-core", "Poll question cannot exceed %s characters."),
QT_TRANSLATE_NOOP("bitcoin-core", "Poll signature failed. See debug.log."),
QT_TRANSLATE_NOOP("bitcoin-core", "Poll title cannot exceed %s characters."),
QT_TRANSLATE_NOOP("bitcoin-core", "Poll with that title already exists. Please choose another title."),
QT_TRANSLATE_NOOP("bitcoin-core", "Pool"),
QT_TRANSLATE_NOOP("bitcoin-core", "Project email mismatch"),
QT_TRANSLATE_NOOP("bitcoin-core", "Quorum Hash"),
QT_TRANSLATE_NOOP("bitcoin-core", "Reindexing blockchain from on disk block data files..."),
QT_TRANSLATE_NOOP("bitcoin-core", "Replaying contracts..."),
QT_TRANSLATE_NOOP("bitcoin-core", "Rescanning..."),
QT_TRANSLATE_NOOP("bitcoin-core", "Reset Blockchain Data: Blockchain data removal was a failure"),
QT_TRANSLATE_NOOP("bitcoin-core", "Reset Blockchain Data: Blockchain data removal failed."),
QT_TRANSLATE_NOOP("bitcoin-core", "Reset Blockchain Data: Blockchain data removal was a success"),
QT_TRANSLATE_NOOP("bitcoin-core", "SHA256SUM of snapshot.zip does not match the server's SHA256SUM."),
QT_TRANSLATE_NOOP("bitcoin-core", "Resetting block chain index to prepare for reindexing..."),
QT_TRANSLATE_NOOP("bitcoin-core", "Send command to -server or gridcoinresearchd"),
QT_TRANSLATE_NOOP("bitcoin-core", "Sending..."),
QT_TRANSLATE_NOOP("bitcoin-core", "Single Choice"),
Expand Down Expand Up @@ -264,7 +269,6 @@ QT_TRANSLATE_NOOP("bitcoin-core", "The wallet will now shutdown."),
QT_TRANSLATE_NOOP("bitcoin-core", "This update is "),
QT_TRANSLATE_NOOP("bitcoin-core", "To use the %s option"),
QT_TRANSLATE_NOOP("bitcoin-core", "Unable to bind to %s on this computer (bind returned error %d, %s)"),
QT_TRANSLATE_NOOP("bitcoin-core", "Unknown -socks proxy version requested: %i"),
QT_TRANSLATE_NOOP("bitcoin-core", "Unknown error"),
QT_TRANSLATE_NOOP("bitcoin-core", "Unknown network specified in -onlynet: '%s'"),
QT_TRANSLATE_NOOP("bitcoin-core", "Unknown poll response type."),
Expand Down
Loading