Skip to content

Fix #109: connect --language and --country to export request options - #449

Open
jacalata wants to merge 2 commits into
developmentfrom
jac/109-export-language-country
Open

Fix #109: connect --language and --country to export request options#449
jacalata wants to merge 2 commits into
developmentfrom
jac/109-export-language-country

Conversation

@jacalata

Copy link
Copy Markdown
Contributor

Summary

  • --language was already threading through to request_options.language on export, but --country never reached the REST API. tabcmd Classic combined the two into a BCP 47 locale (e.g. en-GB, de-DE, pt-BR) so exports formatted numbers, dates, and currency for that region.
  • Add _resolve_locale() that joins language + country when both are set, falls back to language alone, and drops country-only (matching Classic which required --language with --country).
  • Route apply_png_options / apply_pdf_options / apply_csv_options through the helper.
  • Relax --country choices from language codes (de|en|es|fr|it|...) to any 2-letter code (upper-cased), so users can actually pass country codes like GB, MX, BR.

Closes#109.

Test plan

  • tests/commands/test_datasources_and_workbooks_command.py — 6 new tests cover combined locale for PNG/PDF/CSV, country-only drop, language-only pass-through
  • Full test_datasources_and_workbooks_command.py suite: 30 passed

🤖 Generated with Claude Code

--language was already threading through to
request_options.language on export, but --country never reached the
REST API. tabcmd Classic combined the two into a BCP 47 locale like
en-GB or de-DE so exports formatted numbers, dates, and currency for
that region.
- Add _resolve_locale() that joins language + country when both are set,
falls back to language alone, and drops country-only (matching Classic
which required --language with --country).
- Route apply_png_options / apply_pdf_options / apply_csv_options
through the helper.
- Relax --country choices from language codes to any 2-letter code
(upper-cased), so users can pass real country codes like GB, MX, BR.
Fixes#109.
@github-actions

github-actionsBot commented Aug 4, 2026

Copy link
Copy Markdown

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@jacalata