Skip to content

Conversation

@hebasto
Copy link
Member

@hebasto hebasto commented Oct 15, 2022

The old Transifex Command-Line Tool is considered deprecated (as of January 2022) and will sunset on Nov 30, 2022.

See: transifex/transifex-client#340

A PR with accompanying changes to .tx/config: bitcoin/bitcoin#26321

The old Transifex Command-Line Tool is considered deprecated (as of
January 2022) and will sunset on Nov 30, 2022.

See: transifex/transifex-client#340
@hebasto
Copy link
Member Author

hebasto commented Oct 15, 2022

For the reference, here are tx help pull outputs:

$ tx --version
0.12.5, py 3.10, x86_64
$ tx help pull
Usage: tx [tx_options] pull [options]

This command pulls all outstanding changes from the remote Transifex server to
the local repository. By default, only the files that are watched by Transifex
will be updated but if you want to fetch the translations for new languages as
well, use the -a|--all option. (Note: new translations are saved in the .tx
folder and require the user to manually rename them and add then in Transifex
using the set_translation command).

Options:
  -h, --help            show this help message and exit
  -l LANGUAGES, --language=LANGUAGES
                        Specify which translations you want to pull (defaults
                        to all)
  -r RESOURCES, --resource=RESOURCES
                        Specify the resource for which you want to pull the
                        translations (defaults to all)
  -a, --all             Fetch all translation files from server (even new
                        ones)
  -s, --source          Force the fetching of the source file (default: False)
  -f, --force           Force download of translations files.
  --skip                Don't stop on errors. Useful when pushing many files
                        concurrently.
  --disable-overwrite   By default transifex will fetch new translations files
                        and replace existing ones. Use this flag if you want
                        to disable this feature
  --minimum-perc=MINIMUM_PERC
                        Specify the minimum acceptable percentage of a
                        translation in order to download it.
  --pseudo              Apply this option to download a pseudo file.
  --mode=MODE           Specify the mode of the translation file to pull (e.g.
                        'reviewed'). See http://bit.ly/pullmode for available
                        values.
  -x, --xliff           Apply this option to download file as xliff.
$ tx --version
TX Client, version=1.4.0
$ tx help pull
NAME:
   tx pull - tx pull [options] [resource_id...]

USAGE:
   tx pull [command options] [arguments...]

OPTIONS:
   --xliff                             Download translation files in xliff format (default: false)
   --json                              Download translation files in json format (default: false)
   --content_encoding value, -e value  The encoding of the file. This can be one of the following:
    'text', 'base64' (default: "text")
   --mode value, -m value  The translation mode of the downloaded file. This can be one of the following:
    'default', 'reviewed', 'proofread', 'translator', 'untranslated',
    'onlytranslated', 'onlyreviewed', 'onlyproofread', 'sourceastranslation' (default: "default")
   --force, -f                  Force the download of the translationsfiles regardless of whether timestamps on the local computer are newer than those on the server (default: false)
   --languages value, -l value  Download specific languages, comma separated Transifex language codes
   --source, -s                 Download source file only (default: false)
   --translations, -t           Downloads translations files (default) (default: false)
   --disable-overwrite, -d      Whether skip existing files (default: false)
   --skip                       Whether to skip on errors (default: false)
   --use-git-timestamps         Compare local files to their Transifex version by their latest commit timestamps. Use this option, for example, when cloning a Git repository. (default: false)
   --branch value               Push to specific branch (use empty argument '' to use the current branch, if it can be determined) (default: "-1")
   --all, -a                    Whether to download all files (default: false)
   --resources value, -r value  Backwards compatibility with old client to fetch resource ids
   --minimum-perc value         Specify the minimum acceptable percentage of a translation mode in order to download it. (default: -1)
   --workers value, -w value    How many parallel workers to use (default: 5)
   --silent                     Whether to reduce verbosity of the output (default: false)
   

hebasto added a commit to hebasto/bitcoin that referenced this pull request Oct 15, 2022
The old Transifex Command-Line Tool is considered deprecated (as of
January 2022) and will sunset on Nov 30, 2022.

See: https://github.com/transifex/cli/blob/devel/README.md#migrating-from-older-versions-of-the-client

An accompanying PR: bitcoin-core/bitcoin-maintainer-tools#142
@hebasto
Copy link
Member Author

hebasto commented Oct 17, 2022

cc @luke-jr @wtogami @jarolrod

Copy link
Contributor

@jarolrod jarolrod left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the changes to the arguments we call the cli tool required here? The doc talking about using the new tx cli tool states that:

The current version of the client maintains backwards compatibility for the tx push and tx pull commands. So, if you have a CI setup that uses them, you should not have to change anything.

Per the doc, the only necessary changes are those to the .tx/config file. Is the motivation here to ensure that we are using the newest api of the tool?

@hebasto
Copy link
Member Author

hebasto commented Oct 18, 2022

Is the changes to the arguments we call the cli tool required here?

With no changes:

$ ../bitcoin-maintainer-tools/update-translations.py 
It doesn't make sense to use the '--all' or '--language' flag without the '--translation' flag
Error while fetching translations

@katesalazar
Copy link

katesalazar commented Oct 18, 2022

If it's demanding "--translation" why the PR does give "--translations"? Is that a typo or is it valid as same?

Edit: messed the 's' around wrongly.

fanquake added a commit to bitcoin/bitcoin that referenced this pull request Oct 18, 2022
d6adbb7 Adjust `.tx/config` for new Transifex CLI (Hennadii Stepanov)

Pull request description:

  The old Transifex Command-Line Tool is considered deprecated (as of January 2022) and will sunset on Nov 30, 2022.

  See: https://github.com/transifex/cli/blob/devel/README.md#migrating-from-older-versions-of-the-client

  An accompanying PR: bitcoin-core/bitcoin-maintainer-tools#142

ACKs for top commit:
  jarolrod:
    ACK d6adbb7

Tree-SHA512: aa63158e02dc136be1669f3ff9ca28a990da215227520a197968ebe1a0a6fa73526cbd6d8fd7eed608eb06ad242c66598826c58e124c1fc53beaa28ae6b53c37
adam2k pushed a commit to adam2k/bitcoin that referenced this pull request Oct 19, 2022
The old Transifex Command-Line Tool is considered deprecated (as of
January 2022) and will sunset on Nov 30, 2022.

See: https://github.com/transifex/cli/blob/devel/README.md#migrating-from-older-versions-of-the-client

An accompanying PR: bitcoin-core/bitcoin-maintainer-tools#142
fanquake pushed a commit to fanquake/bitcoin that referenced this pull request Oct 28, 2022
The old Transifex Command-Line Tool is considered deprecated (as of
January 2022) and will sunset on Nov 30, 2022.

See: https://github.com/transifex/cli/blob/devel/README.md#migrating-from-older-versions-of-the-client

An accompanying PR: bitcoin-core/bitcoin-maintainer-tools#142

Github-Pull: bitcoin#26321
Rebased-From: d6adbb7
fanquake pushed a commit to fanquake/bitcoin that referenced this pull request Oct 28, 2022
The old Transifex Command-Line Tool is considered deprecated (as of
January 2022) and will sunset on Nov 30, 2022.

See: https://github.com/transifex/cli/blob/devel/README.md#migrating-from-older-versions-of-the-client

An accompanying PR: bitcoin-core/bitcoin-maintainer-tools#142

Github-Pull: bitcoin#26321
Rebased-From: d6adbb7
fanquake pushed a commit to fanquake/bitcoin that referenced this pull request Oct 28, 2022
The old Transifex Command-Line Tool is considered deprecated (as of
January 2022) and will sunset on Nov 30, 2022.

See: https://github.com/transifex/cli/blob/devel/README.md#migrating-from-older-versions-of-the-client

An accompanying PR: bitcoin-core/bitcoin-maintainer-tools#142

Github-Pull: bitcoin#26321
Rebased-From: d6adbb7
satsie pushed a commit to satsie/bitcoin that referenced this pull request Oct 31, 2022
The old Transifex Command-Line Tool is considered deprecated (as of
January 2022) and will sunset on Nov 30, 2022.

See: https://github.com/transifex/cli/blob/devel/README.md#migrating-from-older-versions-of-the-client

An accompanying PR: bitcoin-core/bitcoin-maintainer-tools#142
@hebasto
Copy link
Member Author

hebasto commented Oct 31, 2022

@MarcoFalke @fanquake

As bitcoin/bitcoin#26321 has been merged and backported into 24.x and 23.x, this PR should be merged as well.

@fanquake fanquake merged commit 0b46792 into bitcoin-core:main Oct 31, 2022
@hebasto hebasto deleted the 221015-tx branch October 31, 2022 15:59
vertiond added a commit to vertcoin-project/vertcoin-core that referenced this pull request Nov 3, 2022
* rpc: Capture potentially large UniValue by ref for rpcdoccheck

Github-Pull: 25237
Rebased-From: 20ff499

* Add pure Python RIPEMD-160

Github-Pull: 23716
Rebased-From: ad3e9e1

* Swap out hashlib.ripemd160 for own implementation

Github-Pull: 23716
Rebased-From: 5b559dc

* windeploy: Renewed windows code signing certificate

Github-Pull: #25201
Rebased-From: 7e9fe6d

* Prevent data race for `pathHandlers`

Github-Pull: bitcoin/bitcoin#25983
Rebased-From: 4296dde

* Revert "build: Use Homebrew's sqlite package if it is available"

This reverts ee7b84e from #20527.
This change was made without any rationale, maybe other than a brew
installed version might be newer, and that's "better". However when
building from source on macOS, it just results in drastically worse
perofrmance, and results in issues / confusions like #25724.

Resolves the "build from source" portion of #25724. Building from
depends is still not ideal, however I have some other changes that might
help improve things in that case.

The difference in performance can be observed using the example from
bitcoin/bitcoin#25724 (comment),
but minified to only 10 descriptors. i.e:
```bash
time src/bitcoin-cli createwallet speedy true
time src/bitcoin-cli importdescriptors '[
  {"desc":"raw(00145846369f3d6ba366d6f5a903fb5cf4dca3763c0e)#k9wh6v62","timestamp":"now"},
  {"desc":"raw(001420800aabf13f3a4c4ce3ce4c66cecf1d17f21a6e)#6m0hlfh4","timestamp":"now"},
  {"desc":"raw(0014c6bf9715e06d73ebf9b3b02d5cc48d24d8bbabc1)#wyavh36r","timestamp":"now"},
  {"desc":"raw(00141ba7807b3f46af113beaea5c698428ce7138cd8a)#jctdsups","timestamp":"now"},
  {"desc":"raw(00140c1bd27f10fff01b36ddf3c1febaa1acff19b080)#9s6nc3pk","timestamp":"now"},
  {"desc":"raw(00141226e31987e4bc2e63c0ee12908f675e40464b20)#9pp7qm39","timestamp":"now"},
  {"desc":"raw(0014f73f149f7503960a5e849c6ee7a8a8c336f631cb)#qtkxv9fc","timestamp":"now"},
  {"desc":"raw(0014c8ccb4d81ffc769fc5fdd8d7eed69b0e0cae5749)#hn39qayv","timestamp":"now"},
  {"desc":"raw(001498565aead2d67a22a6021d55210f2a917fc22169)#6ar3vwsx","timestamp":"now"},
  {"desc":"raw(001403013248ac0cd9eabe176cad162cda2a19f771e1)#4m47mukd","timestamp":"now"}
]'
```

Running master, when building from souce and using brew installed
sqlite, this takes ~3.4s. With this PR, the same operation takes ~0.3s.

Github-Pull: #25985
Rebased-From: d216d71

* doc: remove brew install sqlite from macOS docs

* Adjust `.tx/config` for new Transifex CLI

The old Transifex Command-Line Tool is considered deprecated (as of
January 2022) and will sunset on Nov 30, 2022.

See: https://github.com/transifex/cli/blob/devel/README.md#migrating-from-older-versions-of-the-client

An accompanying PR: bitcoin-core/bitcoin-maintainer-tools#142

Github-Pull: #26321
Rebased-From: d6adbb7

* rpc: fix crash in deriveaddresses when derivation index is 2147483647

2147483647 is the maximum positive value of a signed int32, and - currently -
the maximum value that the deriveaddresses bitcoin RPC call accepts as
derivation index due to its input validation routines.

Before this change, when the derivation index (and thus range_end) reached
std::numeric_limits<int_32_t>::max(), the "i" variable in the for cycle (which
is declared as int, and as such 32 bits in size on most platforms) would be
incremented at the end of the first iteration and then warp back to
-2147483648. This caused SIGABRT in bitcoind and a core dump.

This change assigns "i" an explicit size of 64 bits on every platform,
sidestepping the problem.

Fixes #26274.

Github-Pull: #26275
Rebased-From: addf9d6

* rpc: add non-regression test about deriveaddresses crash when index is 2147483647

This test would cause a crash in bitcoind (see #26274) if the fix given in the
previous commit was not applied.

Github-Pull: #26275
Rebased-From: 9153ff3

* build: Bump version to 22.1.0rc1

* doc: Update manual pages for 22.1.0rc1

* doc: update version number in bips.md to v22.1

* qt: 22.1rc1 translations update

* vtc review: missed branding items

Co-authored-by: Martin Zumsande <[email protected]>
Co-authored-by: Pieter Wuille <[email protected]>
Co-authored-by: laanwj <[email protected]>
Co-authored-by: MacroFake <[email protected]>
Co-authored-by: Andrew Chow <[email protected]>
Co-authored-by: Hennadii Stepanov <[email protected]>
Co-authored-by: fanquake <[email protected]>
Co-authored-by: muxator <[email protected]>
@bitcoin-core bitcoin-core deleted a comment Nov 12, 2022
@bitcoin-core bitcoin-core locked and limited conversation to collaborators Nov 12, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants