feat: add auto-update government distance rates toggle - #97936
feat: add auto-update government distance rates toggle#97936Krishna2323 wants to merge 10 commits into
Conversation
Signed-off-by: krishna2323 <belivethatkg@gmail.com>
Signed-off-by: krishna2323 <belivethatkg@gmail.com>
Signed-off-by: krishna2323 <belivethatkg@gmail.com>
|
Hey, I noticed you changed If you want to automatically generate translations for other locales, an Expensify employee will have to:
Alternatively, if you are an external contributor, you can run the translation script locally with your own OpenAI API key. To learn more, try running: npx ts-node ./scripts/generateTranslations.ts --helpTypically, you'd want to translate only what you changed by running |
|
Hey, I noticed you changed If you want to automatically generate translations for other locales, an Expensify employee will have to:
Alternatively, if you are an external contributor, you can run the translation script locally with your own OpenAI API key. To learn more, try running: npx bun ./scripts/generateTranslations.ts --helpTypically, you'd want to translate only what you changed by running |
Signed-off-by: krishna2323 <belivethatkg@gmail.com>
Signed-off-by: krishna2323 <belivethatkg@gmail.com>
Signed-off-by: krishna2323 <belivethatkg@gmail.com>
|
@thelullabyy Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
Signed-off-by: krishna2323 <belivethatkg@gmail.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: efc8505151
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Signed-off-by: krishna2323 <belivethatkg@gmail.com>
🦜 Polyglot Parrot! 🦜Squawk! Looks like you added some shiny new English strings. Allow me to parrot them back to you in other tongues: View the translation diffdiff --git a/src/languages/de.ts b/src/languages/de.ts
index 635638da..7cadc01d 100644
--- a/src/languages/de.ts
+++ b/src/languages/de.ts
@@ -7170,6 +7170,10 @@ Der Control-Tarif beginnt bei 9 $ pro aktivem Mitglied und Monat.`,
startDate: 'Startdatum',
endDate: 'Enddatum',
autoGeneratedRateTooltip: 'Dieser Satz wurde automatisch erzeugt.',
+ autoUpdateGovernmentRate: 'Regierungssatz automatisch aktualisieren',
+ autoUpdateGovernmentRateDescription: (countryPhrase: string) =>
+ `Neue Steuersätze automatisch erstellen, wenn ${countryPhrase} neue Richtlinien veröffentlicht. Vorhandene Steuersätze werden nicht geändert.`,
+ governmentRateCountries: {US: 'die Vereinigten Staaten', CA: 'Kanada', GB: 'Großbritannien', AU: 'Australien'},
},
editor: {
descriptionInputLabel: 'Beschreibung',
diff --git a/src/languages/el.ts b/src/languages/el.ts
index d90403cc..401add4d 100644
--- a/src/languages/el.ts
+++ b/src/languages/el.ts
@@ -7428,6 +7428,10 @@ _Για πιο αναλυτικές οδηγίες, [επισκεφθείτε τ
startDateMustBeBeforeEndDate: 'Η ημερομηνία έναρξης πρέπει να είναι πριν από την ημερομηνία λήξης',
},
autoGeneratedRateTooltip: 'Αυτός ο συντελεστής δημιουργείται αυτόματα.',
+ autoUpdateGovernmentRate: 'Αυτόματη ενημέρωση κρατικού συντελεστή',
+ autoUpdateGovernmentRateDescription: (countryPhrase: string) =>
+ `Δημιουργεί αυτόματα νέες τιμές όταν το ${countryPhrase} δημοσιεύει νέες οδηγίες. Δεν τροποποιεί τις υπάρχουσες τιμές.`,
+ governmentRateCountries: {US: 'οι Ηνωμένες Πολιτείες', CA: 'Καναδάς', GB: 'Μεγάλη Βρετανία', AU: 'Αυστραλία'},
},
editor: {
descriptionInputLabel: 'Περιγραφή',
diff --git a/src/languages/es.ts b/src/languages/es.ts
index 154b2910..9b2c8ed0 100644
--- a/src/languages/es.ts
+++ b/src/languages/es.ts
@@ -7137,6 +7137,10 @@ El plan Controlar empieza en 9 $ por miembro activo al mes.`,
startDate: 'Fecha de inicio',
endDate: 'Fecha de fin',
autoGeneratedRateTooltip: 'Esta tasa se genera automáticamente.',
+ autoUpdateGovernmentRate: 'Actualizar automáticamente la tasa gubernamental',
+ autoUpdateGovernmentRateDescription: (countryPhrase: string) =>
+ `Crea automáticamente nuevas tasas cuando ${countryPhrase} publique nuevas directrices. No modifica las tasas existentes.`,
+ governmentRateCountries: {US: 'Estados Unidos', CA: 'Canadá', GB: 'Gran Bretaña', AU: 'Australia'},
},
editor: {
nameInputLabel: 'Nombre',
diff --git a/src/languages/fr.ts b/src/languages/fr.ts
index d5fb36e8..1182bf4c 100644
--- a/src/languages/fr.ts
+++ b/src/languages/fr.ts
@@ -7197,6 +7197,10 @@ Le forfait Control commence à 9 $ par Membre actif et par mois.`,
startDate: 'Date de début',
endDate: 'Date de fin',
autoGeneratedRateTooltip: 'Ce taux est généré automatiquement.',
+ autoUpdateGovernmentRate: 'Mise à jour automatique du taux gouvernemental',
+ autoUpdateGovernmentRateDescription: (countryPhrase: string) =>
+ `Créer automatiquement de nouveaux taux lorsque ${countryPhrase} publie de nouvelles directives. Ne modifie pas les taux existants.`,
+ governmentRateCountries: {US: 'les États-Unis', CA: 'Canada', GB: 'Grande-Bretagne', AU: 'Australie'},
},
editor: {
descriptionInputLabel: 'Description',
diff --git a/src/languages/it.ts b/src/languages/it.ts
index 8e1b563d..95e44db6 100644
--- a/src/languages/it.ts
+++ b/src/languages/it.ts
@@ -7141,6 +7141,10 @@ Il piano Control parte da 9 $ al mese per ogni membro attivo.`,
startDate: 'Data di inizio',
endDate: 'Data di fine',
autoGeneratedRateTooltip: 'Questa tariffa è generata automaticamente.',
+ autoUpdateGovernmentRate: 'Aggiorna automaticamente tariffa governativa',
+ autoUpdateGovernmentRateDescription: (countryPhrase: string) =>
+ `Crea automaticamente nuove aliquote quando ${countryPhrase} pubblica nuove linee guida. Non modifica le aliquote esistenti.`,
+ governmentRateCountries: {US: 'gli Stati Uniti', CA: 'Canada', GB: 'Gran Bretagna', AU: 'Australia'},
},
editor: {
descriptionInputLabel: 'Descrizione',
diff --git a/src/languages/ja.ts b/src/languages/ja.ts
index 283c302e..c0d7f9af 100644
--- a/src/languages/ja.ts
+++ b/src/languages/ja.ts
@@ -7059,6 +7059,10 @@ Control プランは、アクティブメンバー1人あたり月額 $9 から
startDate: '開始日',
endDate: '終了日',
autoGeneratedRateTooltip: 'このレートは自動生成されています。',
+ autoUpdateGovernmentRate: '公定レートを自動更新',
+ autoUpdateGovernmentRateDescription: (countryPhrase: string) =>
+ `${countryPhrase} が新しいガイダンスを公開したときに、新しいレートを自動的に作成します。既存のレートは変更しません。`,
+ governmentRateCountries: {US: 'アメリカ合衆国', CA: 'カナダ', GB: 'グレートブリテン', AU: 'オーストラリア'},
},
editor: {
descriptionInputLabel: '説明',
diff --git a/src/languages/nl.ts b/src/languages/nl.ts
index c313ee7d..8e697d00 100644
--- a/src/languages/nl.ts
+++ b/src/languages/nl.ts
@@ -7128,6 +7128,10 @@ Het Control-abonnement begint bij $9 per actieve deelnemer per maand.`,
startDate: 'Startdatum',
endDate: 'Einddatum',
autoGeneratedRateTooltip: 'Dit tarief is automatisch gegenereerd.',
+ autoUpdateGovernmentRate: 'Automatische update overheidstarief',
+ autoUpdateGovernmentRateDescription: (countryPhrase: string) =>
+ `Maak automatisch nieuwe tarieven aan wanneer ${countryPhrase} nieuwe richtlijnen publiceert. Past bestaande tarieven niet aan.`,
+ governmentRateCountries: {US: 'de Verenigde Staten', CA: 'Canada', GB: 'Groot-Brittannië', AU: 'Australië'},
},
editor: {
descriptionInputLabel: 'Beschrijving',
diff --git a/src/languages/pl.ts b/src/languages/pl.ts
index ad7bfa61..36261c79 100644
--- a/src/languages/pl.ts
+++ b/src/languages/pl.ts
@@ -7105,6 +7105,9 @@ Plan Control zaczyna się od 9 USD za aktywnego członka miesięcznie.`,
startDate: 'Data rozpoczęcia',
endDate: 'Data zakończenia',
autoGeneratedRateTooltip: 'Ta stawka jest generowana automatycznie.',
+ autoUpdateGovernmentRate: 'Automatycznie aktualizuj stawkę rządową',
+ autoUpdateGovernmentRateDescription: (countryPhrase: string) => `Automatycznie twórz nowe stawki, gdy ${countryPhrase} publikuje nowe wytyczne. Nie zmienia istniejących stawek.`,
+ governmentRateCountries: {US: 'Stany Zjednoczone', CA: 'Kanada', GB: 'Wielka Brytania', AU: 'Australia'},
},
editor: {
descriptionInputLabel: 'Opis',
diff --git a/src/languages/pt-BR.ts b/src/languages/pt-BR.ts
index ebb23579..ad47c685 100644
--- a/src/languages/pt-BR.ts
+++ b/src/languages/pt-BR.ts
@@ -7127,6 +7127,10 @@ O plano Control começa em US$ 9 por membro ativo por mês.`,
startDate: 'Data de início',
endDate: 'Data de término',
autoGeneratedRateTooltip: 'Essa tarifa é gerada automaticamente.',
+ autoUpdateGovernmentRate: 'Atualizar automaticamente a taxa governamental',
+ autoUpdateGovernmentRateDescription: (countryPhrase: string) =>
+ `Criar automaticamente novas taxas quando ${countryPhrase} publicar novas orientações. Não modifica as taxas existentes.`,
+ governmentRateCountries: {US: 'os Estados Unidos', CA: 'Canadá', GB: 'Reino Unido', AU: 'Austrália'},
},
editor: {
descriptionInputLabel: 'Descrição',
diff --git a/src/languages/zh-hans.ts b/src/languages/zh-hans.ts
index cbe4a0c5..437ddb2d 100644
--- a/src/languages/zh-hans.ts
+++ b/src/languages/zh-hans.ts
@@ -6890,6 +6890,9 @@ _如需更详细的说明,请[访问我们的帮助网站](${CONST.NETSUITE_IM
startDate: '开始日期',
endDate: '结束日期',
autoGeneratedRateTooltip: '此费率为自动生成。',
+ autoUpdateGovernmentRate: '自动更新政府费率',
+ autoUpdateGovernmentRateDescription: (countryPhrase: string) => `当${countryPhrase}发布新指引时自动创建新税率。不会修改现有税率。`,
+ governmentRateCountries: {US: '美国', CA: '加拿大', GB: '大不列颠', AU: '澳大利亚'},
},
editor: {
descriptionInputLabel: '描述',
Note You can apply these changes to your branch by copying the patch to your clipboard, then running |
Signed-off-by: krishna2323 <belivethatkg@gmail.com>
Codecov Report❌ Looks like you've decreased code coverage for some files. Please write tests to increase, or at least maintain, the existing level of code coverage. See our documentation here for how to interpret this table.
|
|
@JmillsExpensify @MelvinBot Could you please assign me this issue? @MelvinBot removed me from the issue accidently |
|
👋 Checked the linked issue Expensify/App#95281 — you ( |
|
@MelvinBot You are able to do it, please assign me, I'm C+ for this issue/PR |
|
✅ Done — I've added you ( |
Explanation of Change
Fixed Issues
$ #95281
PROPOSAL:
Tests
Prerequisites
Distance unit correction
Unsupported currency
Failure path
Offline tests
QA Steps
Same as tests
Verify that no errors appear in the JS console
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectioncanBeMissingparam foruseOnyxtoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
android_hybrid.mp4
Android: mWeb Chrome
android_mWeb.mp4
iOS: Native
ios_hybrid.mp4
iOS: mWeb Safari
ios_mWeb.mp4
MacOS: Chrome / Safari
web_chrome.mp4