[web] Rename storage_unit i18n key (#1639)

and remove separate gb
This commit is contained in:
Manav Rathi 2024-05-07 11:30:58 +05:30 committed by GitHub
commit 500d163df0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
21 changed files with 112 additions and 128 deletions

View file

@ -40,7 +40,7 @@ export default function StorageSection({ usage, storage }: Iprops) {
fontWeight={"bold"}
sx={{ fontSize: "24px", lineHeight: "30px" }}
>
{`${bytesInGB(usage)} / ${bytesInGB(storage)} ${t("GB")} ${t("USED")}`}
{`${bytesInGB(usage)} / ${bytesInGB(storage)} ${t("storage_unit.gb")} ${t("USED")}`}
</Typography>
</MobileSmallBox>
</Box>

View file

@ -32,7 +32,8 @@ export default function PaidSubscriptionPlanSelectorCard({
{t("SUBSCRIPTION")}
</Typography>
<Typography variant="small" color={"text.muted"}>
{bytesInGB(subscription.storage, 2)} {t("GB")}
{bytesInGB(subscription.storage, 2)}{" "}
{t("storage_unit.gb")}
</Typography>
</Box>
<IconButton onClick={closeModal} color="secondary">
@ -46,7 +47,7 @@ export default function PaidSubscriptionPlanSelectorCard({
<Trans
i18nKey="CURRENT_USAGE"
values={{
usage: `${bytesInGB(usage, 2)} ${t("GB")}`,
usage: `${bytesInGB(usage, 2)} ${t("storage_unit.gb")}`,
}}
/>
</Typography>

View file

@ -67,7 +67,7 @@ export function PlanRow({
</Typography>
<FlexWrapper flexWrap={"wrap"} gap={1}>
<Typography variant="h3" color="text.muted">
{t("GB")}
{t("storage_unit.gb")}
</Typography>
{popular && !hasPaidSubscription(subscription) && (
<Badge>{t("POPULAR")}</Badge>

View file

@ -1,6 +1,6 @@
import { t } from "i18next";
const StorageUnits = ["B", "KB", "MB", "GB", "TB"];
const units = ["b", "kb", "mb", "gb", "tb"];
/**
* Convert the given number of {@link bytes} to their equivalent GB string with
@ -59,16 +59,16 @@ export const formattedStorageByteSize = (
options?: FormattedStorageByteSizeOptions,
): string => {
if (bytes <= 0) {
return `0 ${t("STORAGE_UNITS.MB")}`;
return `0 ${t("storage_unit.mb")}`;
}
const i = Math.floor(Math.log(bytes) / Math.log(1024));
let quantity = bytes / Math.pow(1024, i);
let unit = StorageUnits[i];
let unit = units[i];
if (quantity > 100 && unit !== "GB") {
quantity /= 1024;
unit = StorageUnits[i + 1];
unit = units[i + 1];
}
quantity = Number(quantity.toFixed(1));
@ -81,5 +81,5 @@ export const formattedStorageByteSize = (
}
}
return `${quantity} ${t(`STORAGE_UNITS.${unit}`)}`;
return `${quantity} ${t(`storage_unit.${unit}`)}`;
};

View file

@ -447,7 +447,6 @@
"DOWNLOAD_LOGS_MESSAGE": "",
"CHANGE_FOLDER": "",
"TWO_MONTHS_FREE": "",
"GB": "",
"POPULAR": "",
"FREE_PLAN_OPTION_LABEL": "",
"FREE_PLAN_DESCRIPTION": "",
@ -494,12 +493,12 @@
"EXPORT_DIRECTORY_DOES_NOT_EXIST": "",
"EXPORT_DIRECTORY_DOES_NOT_EXIST_MESSAGE": "",
"SUBSCRIPTION_VERIFICATION_ERROR": "",
"STORAGE_UNITS": {
"B": "",
"KB": "",
"MB": "",
"GB": "",
"TB": ""
"storage_unit": {
"b": "",
"kb": "",
"mb": "",
"gb": "",
"tb": ""
},
"AFTER_TIME": {
"HOUR": "",

View file

@ -447,7 +447,6 @@
"DOWNLOAD_LOGS_MESSAGE": "<p>Hier kannst du Debug-Logs herunterladen, die du uns zur Fehleranalyse zusenden kannst.</p><p> Beachte bitte, dass die Logs Dateinamen enthalten, um Probleme mit bestimmten Dateien nachvollziehen zu können. </p>",
"CHANGE_FOLDER": "Ordner ändern",
"TWO_MONTHS_FREE": "Erhalte 2 Monate kostenlos bei Jahresabonnements",
"GB": "GB",
"POPULAR": "Beliebt",
"FREE_PLAN_OPTION_LABEL": "Mit kostenloser Testversion fortfahren",
"FREE_PLAN_DESCRIPTION": "1 GB für 1 Jahr",
@ -494,12 +493,12 @@
"EXPORT_DIRECTORY_DOES_NOT_EXIST": "Ungültiges Exportverzeichnis",
"EXPORT_DIRECTORY_DOES_NOT_EXIST_MESSAGE": "<p>Das von dir gewählte Exportverzeichnis existiert nicht.</p><p> Bitte wähle einen gültigen Ordner.</p>",
"SUBSCRIPTION_VERIFICATION_ERROR": "Verifizierung des Abonnements fehlgeschlagen",
"STORAGE_UNITS": {
"B": "B",
"KB": "KB",
"MB": "MB",
"GB": "GB",
"TB": "TB"
"storage_unit": {
"b": "B",
"kb": "KB",
"mb": "MB",
"gb": "GB",
"tb": "TB"
},
"AFTER_TIME": {
"HOUR": "nach einer Stunde",

View file

@ -447,7 +447,6 @@
"DOWNLOAD_LOGS_MESSAGE": "<p>This will download debug logs, which you can email to us to help debug your issue.</p><p> Please note that file names will be included to help track issues with specific files. </p>",
"CHANGE_FOLDER": "Change Folder",
"TWO_MONTHS_FREE": "Get 2 months free on yearly plans",
"GB": "GB",
"POPULAR": "Popular",
"FREE_PLAN_OPTION_LABEL": "Continue with free trial",
"FREE_PLAN_DESCRIPTION": "1 GB for 1 year",
@ -494,12 +493,12 @@
"EXPORT_DIRECTORY_DOES_NOT_EXIST": "Invalid export directory",
"EXPORT_DIRECTORY_DOES_NOT_EXIST_MESSAGE": "<p>The export directory you have selected does not exist.</p><p> Please select a valid directory.</p>",
"SUBSCRIPTION_VERIFICATION_ERROR": "Subscription verification failed",
"STORAGE_UNITS": {
"B": "B",
"KB": "KB",
"MB": "MB",
"GB": "GB",
"TB": "TB"
"storage_unit": {
"b": "B",
"kb": "KB",
"mb": "MB",
"gb": "GB",
"tb": "TB"
},
"AFTER_TIME": {
"HOUR": "after an hour",

View file

@ -447,7 +447,6 @@
"DOWNLOAD_LOGS_MESSAGE": "<p>Esto descargará los registros de depuración, que puede enviarnos por correo electrónico para ayudarnos a depurar su problema.</p><p> Tenga en cuenta que los nombres de los archivos se incluirán para ayudar al seguimiento de problemas con archivos específicos. </p>",
"CHANGE_FOLDER": "Cambiar carpeta",
"TWO_MONTHS_FREE": "Obtén 2 meses gratis en planes anuales",
"GB": "GB",
"POPULAR": "Popular",
"FREE_PLAN_OPTION_LABEL": "Continuar con el plan gratuito",
"FREE_PLAN_DESCRIPTION": "1 GB por 1 año",
@ -494,12 +493,12 @@
"EXPORT_DIRECTORY_DOES_NOT_EXIST": "Archivo de exportación inválido",
"EXPORT_DIRECTORY_DOES_NOT_EXIST_MESSAGE": "<p>El directorio de exportación seleccionado no existe.</p><p> Por favor, seleccione un directorio válido.</p>",
"SUBSCRIPTION_VERIFICATION_ERROR": "Falló la verificación de la suscripción",
"STORAGE_UNITS": {
"B": "B",
"KB": "KB",
"MB": "MB",
"GB": "GB",
"TB": "TB"
"storage_unit": {
"b": "B",
"kb": "KB",
"mb": "MB",
"gb": "GB",
"tb": "TB"
},
"AFTER_TIME": {
"HOUR": "después de una hora",

View file

@ -447,7 +447,6 @@
"DOWNLOAD_LOGS_MESSAGE": "",
"CHANGE_FOLDER": "",
"TWO_MONTHS_FREE": "",
"GB": "",
"POPULAR": "",
"FREE_PLAN_OPTION_LABEL": "",
"FREE_PLAN_DESCRIPTION": "",
@ -494,12 +493,12 @@
"EXPORT_DIRECTORY_DOES_NOT_EXIST": "",
"EXPORT_DIRECTORY_DOES_NOT_EXIST_MESSAGE": "",
"SUBSCRIPTION_VERIFICATION_ERROR": "",
"STORAGE_UNITS": {
"B": "",
"KB": "",
"MB": "",
"GB": "",
"TB": ""
"storage_unit": {
"b": "",
"kb": "",
"mb": "",
"gb": "",
"tb": ""
},
"AFTER_TIME": {
"HOUR": "",

View file

@ -447,7 +447,6 @@
"DOWNLOAD_LOGS_MESSAGE": "",
"CHANGE_FOLDER": "",
"TWO_MONTHS_FREE": "",
"GB": "",
"POPULAR": "",
"FREE_PLAN_OPTION_LABEL": "",
"FREE_PLAN_DESCRIPTION": "",
@ -494,12 +493,12 @@
"EXPORT_DIRECTORY_DOES_NOT_EXIST": "",
"EXPORT_DIRECTORY_DOES_NOT_EXIST_MESSAGE": "",
"SUBSCRIPTION_VERIFICATION_ERROR": "",
"STORAGE_UNITS": {
"B": "",
"KB": "",
"MB": "",
"GB": "",
"TB": ""
"storage_unit": {
"b": "",
"kb": "",
"mb": "",
"gb": "",
"tb": ""
},
"AFTER_TIME": {
"HOUR": "",

View file

@ -447,7 +447,6 @@
"DOWNLOAD_LOGS_MESSAGE": "<p>Cela va télécharger les journaux de débug, que vous pourrez nosu envoyer par e-mail pour nous aider à résoudre votre problàme .</p><p>Veuillez noter que les noms de fichiers seront inclus .</p>",
"CHANGE_FOLDER": "Modifier le dossier",
"TWO_MONTHS_FREE": "Obtenir 2 mois gratuits sur les plans annuels",
"GB": "Go",
"POPULAR": "Populaire",
"FREE_PLAN_OPTION_LABEL": "Poursuivre avec la version d'essai gratuite",
"FREE_PLAN_DESCRIPTION": "1 Go pour 1 an",
@ -494,12 +493,12 @@
"EXPORT_DIRECTORY_DOES_NOT_EXIST": "Dossier d'export invalide",
"EXPORT_DIRECTORY_DOES_NOT_EXIST_MESSAGE": "<p> Le dossier d'export que vous avez sélectionné n'existe pas </p><p>Veuillez sélectionner un dossier valide</p>",
"SUBSCRIPTION_VERIFICATION_ERROR": "Échec de la vérification de l'abonnement",
"STORAGE_UNITS": {
"B": "o",
"KB": "Ko",
"MB": "Mo",
"GB": "Go",
"TB": "To"
"storage_unit": {
"b": "o",
"kb": "Ko",
"mb": "Mo",
"gb": "Go",
"tb": "To"
},
"AFTER_TIME": {
"HOUR": "dans une heure",

View file

@ -447,7 +447,6 @@
"DOWNLOAD_LOGS_MESSAGE": "",
"CHANGE_FOLDER": "Cambia Cartella",
"TWO_MONTHS_FREE": "Ottieni 2 mesi gratis sui piani annuali",
"GB": "GB",
"POPULAR": "",
"FREE_PLAN_OPTION_LABEL": "",
"FREE_PLAN_DESCRIPTION": "1 GB per 1 anno",
@ -494,12 +493,12 @@
"EXPORT_DIRECTORY_DOES_NOT_EXIST": "",
"EXPORT_DIRECTORY_DOES_NOT_EXIST_MESSAGE": "",
"SUBSCRIPTION_VERIFICATION_ERROR": "",
"STORAGE_UNITS": {
"B": "B",
"KB": "KB",
"MB": "MB",
"GB": "GB",
"TB": "TB"
"storage_unit": {
"b": "B",
"kb": "KB",
"mb": "MB",
"gb": "GB",
"tb": "TB"
},
"AFTER_TIME": {
"HOUR": "dopo un'ora",

View file

@ -447,7 +447,6 @@
"DOWNLOAD_LOGS_MESSAGE": "",
"CHANGE_FOLDER": "",
"TWO_MONTHS_FREE": "",
"GB": "",
"POPULAR": "",
"FREE_PLAN_OPTION_LABEL": "",
"FREE_PLAN_DESCRIPTION": "",
@ -494,12 +493,12 @@
"EXPORT_DIRECTORY_DOES_NOT_EXIST": "",
"EXPORT_DIRECTORY_DOES_NOT_EXIST_MESSAGE": "",
"SUBSCRIPTION_VERIFICATION_ERROR": "",
"STORAGE_UNITS": {
"B": "",
"KB": "",
"MB": "",
"GB": "",
"TB": ""
"storage_unit": {
"b": "",
"kb": "",
"mb": "",
"gb": "",
"tb": ""
},
"AFTER_TIME": {
"HOUR": "",

View file

@ -447,7 +447,6 @@
"DOWNLOAD_LOGS_MESSAGE": "<p>Dit zal logboeken downloaden, die u ons kunt e-mailen om te helpen bij het debuggen van uw probleem.</p><p> Houd er rekening mee dat bestandsnamen worden opgenomen om problemen met specifieke bestanden bij te houden. </p>",
"CHANGE_FOLDER": "Map wijzigen",
"TWO_MONTHS_FREE": "Krijg 2 maanden gratis op jaarlijkse abonnementen",
"GB": "GB",
"POPULAR": "Populair",
"FREE_PLAN_OPTION_LABEL": "Doorgaan met gratis account",
"FREE_PLAN_DESCRIPTION": "1 GB voor 1 jaar",
@ -494,12 +493,12 @@
"EXPORT_DIRECTORY_DOES_NOT_EXIST": "Ongeldige export map",
"EXPORT_DIRECTORY_DOES_NOT_EXIST_MESSAGE": "<p>De export map die u heeft geselecteerd bestaat niet.</p><p> Selecteer een geldige map.</p>",
"SUBSCRIPTION_VERIFICATION_ERROR": "Abonnementsverificatie mislukt",
"STORAGE_UNITS": {
"B": "B",
"KB": "KB",
"MB": "MB",
"GB": "GB",
"TB": "TB"
"storage_unit": {
"b": "B",
"kb": "KB",
"mb": "MB",
"gb": "GB",
"tb": "TB"
},
"AFTER_TIME": {
"HOUR": "na één uur",

View file

@ -447,7 +447,6 @@
"DOWNLOAD_LOGS_MESSAGE": "<p>Isto irá baixar os logs de depuração, que você pode enviar para nós para ajudar a depurar seu problema.</p><p> Por favor, note que os nomes de arquivos serão incluídos para ajudar a rastrear problemas com arquivos específicos. </p>",
"CHANGE_FOLDER": "Alterar pasta",
"TWO_MONTHS_FREE": "Obtenha 2 meses gratuitos em planos anuais",
"GB": "GB",
"POPULAR": "Popular",
"FREE_PLAN_OPTION_LABEL": "Continuar com teste gratuito",
"FREE_PLAN_DESCRIPTION": "1 GB por 1 ano",
@ -494,12 +493,12 @@
"EXPORT_DIRECTORY_DOES_NOT_EXIST": "Diretório de exportação inválido",
"EXPORT_DIRECTORY_DOES_NOT_EXIST_MESSAGE": "<p>O diretório de exportação que você selecionou não existe.</p><p> Por favor, selecione um diretório válido.</p>",
"SUBSCRIPTION_VERIFICATION_ERROR": "Falha na verificação de assinatura",
"STORAGE_UNITS": {
"B": "B",
"KB": "KB",
"MB": "MB",
"GB": "GB",
"TB": "TB"
"storage_unit": {
"b": "B",
"kb": "KB",
"mb": "MB",
"gb": "GB",
"tb": "TB"
},
"AFTER_TIME": {
"HOUR": "após uma hora",

View file

@ -447,7 +447,6 @@
"DOWNLOAD_LOGS_MESSAGE": "",
"CHANGE_FOLDER": "",
"TWO_MONTHS_FREE": "",
"GB": "",
"POPULAR": "",
"FREE_PLAN_OPTION_LABEL": "",
"FREE_PLAN_DESCRIPTION": "",
@ -494,12 +493,12 @@
"EXPORT_DIRECTORY_DOES_NOT_EXIST": "",
"EXPORT_DIRECTORY_DOES_NOT_EXIST_MESSAGE": "",
"SUBSCRIPTION_VERIFICATION_ERROR": "",
"STORAGE_UNITS": {
"B": "",
"KB": "",
"MB": "",
"GB": "",
"TB": ""
"storage_unit": {
"b": "",
"kb": "",
"mb": "",
"gb": "",
"tb": ""
},
"AFTER_TIME": {
"HOUR": "",

View file

@ -447,7 +447,6 @@
"DOWNLOAD_LOGS_MESSAGE": "<p>При этом будут загружены журналы отладки, которые вы можете отправить нам по электронной почте, чтобы помочь в устранении вашей проблемы.</p><p> Пожалуйста, обратите внимание, что будут указаны имена файлов, которые помогут отслеживать проблемы с конкретными файлами. </p>",
"CHANGE_FOLDER": "Изменить папку",
"TWO_MONTHS_FREE": "Получите 2 месяца бесплатно по годовым планам",
"GB": "Гб",
"POPULAR": "Популярный",
"FREE_PLAN_OPTION_LABEL": "Продолжайте пользоваться бесплатной пробной версией",
"FREE_PLAN_DESCRIPTION": "1 ГБ на 1 год",
@ -494,12 +493,12 @@
"EXPORT_DIRECTORY_DOES_NOT_EXIST": "Недопустимый каталог экспорта",
"EXPORT_DIRECTORY_DOES_NOT_EXIST_MESSAGE": "<p>Выбранный вами каталог экспорта не существует.</p><p> Пожалуйста, выберите правильный каталог.</p>",
"SUBSCRIPTION_VERIFICATION_ERROR": "Не удалось подтвердить подписку",
"STORAGE_UNITS": {
"B": "B",
"KB": "БЗ",
"MB": "Мегабайт",
"GB": "Гб",
"TB": "Терабайт"
"storage_unit": {
"b": "B",
"kb": "БЗ",
"mb": "Мегабайт",
"gb": "Гб",
"tb": "Терабайт"
},
"AFTER_TIME": {
"HOUR": "через час",

View file

@ -447,7 +447,6 @@
"DOWNLOAD_LOGS_MESSAGE": "",
"CHANGE_FOLDER": "",
"TWO_MONTHS_FREE": "",
"GB": "GB",
"POPULAR": "",
"FREE_PLAN_OPTION_LABEL": "",
"FREE_PLAN_DESCRIPTION": "",
@ -494,12 +493,12 @@
"EXPORT_DIRECTORY_DOES_NOT_EXIST": "",
"EXPORT_DIRECTORY_DOES_NOT_EXIST_MESSAGE": "",
"SUBSCRIPTION_VERIFICATION_ERROR": "",
"STORAGE_UNITS": {
"B": "",
"KB": "",
"MB": "",
"GB": "",
"TB": ""
"storage_unit": {
"b": "",
"kb": "",
"mb": "",
"gb": "",
"tb": ""
},
"AFTER_TIME": {
"HOUR": "",

View file

@ -447,7 +447,6 @@
"DOWNLOAD_LOGS_MESSAGE": "",
"CHANGE_FOLDER": "",
"TWO_MONTHS_FREE": "",
"GB": "",
"POPULAR": "",
"FREE_PLAN_OPTION_LABEL": "",
"FREE_PLAN_DESCRIPTION": "",
@ -494,12 +493,12 @@
"EXPORT_DIRECTORY_DOES_NOT_EXIST": "",
"EXPORT_DIRECTORY_DOES_NOT_EXIST_MESSAGE": "",
"SUBSCRIPTION_VERIFICATION_ERROR": "",
"STORAGE_UNITS": {
"B": "",
"KB": "",
"MB": "",
"GB": "",
"TB": ""
"storage_unit": {
"b": "",
"kb": "",
"mb": "",
"gb": "",
"tb": ""
},
"AFTER_TIME": {
"HOUR": "",

View file

@ -447,7 +447,6 @@
"DOWNLOAD_LOGS_MESSAGE": "",
"CHANGE_FOLDER": "",
"TWO_MONTHS_FREE": "",
"GB": "",
"POPULAR": "",
"FREE_PLAN_OPTION_LABEL": "",
"FREE_PLAN_DESCRIPTION": "",
@ -494,12 +493,12 @@
"EXPORT_DIRECTORY_DOES_NOT_EXIST": "",
"EXPORT_DIRECTORY_DOES_NOT_EXIST_MESSAGE": "",
"SUBSCRIPTION_VERIFICATION_ERROR": "",
"STORAGE_UNITS": {
"B": "",
"KB": "",
"MB": "",
"GB": "",
"TB": ""
"storage_unit": {
"b": "",
"kb": "",
"mb": "",
"gb": "",
"tb": ""
},
"AFTER_TIME": {
"HOUR": "",

View file

@ -447,7 +447,6 @@
"DOWNLOAD_LOGS_MESSAGE": "<p>这将下载调试日志,您可以发送电子邮件给我们来帮助调试您的问题。</p><p> 请注意文件名将被包含,以帮助跟踪特定文件中的问题。 </p>",
"CHANGE_FOLDER": "更改文件夹",
"TWO_MONTHS_FREE": "在年度计划上免费获得 2 个月",
"GB": "GB",
"POPULAR": "流行的",
"FREE_PLAN_OPTION_LABEL": "继续免费试用",
"FREE_PLAN_DESCRIPTION": "1 GB 1年",
@ -494,12 +493,12 @@
"EXPORT_DIRECTORY_DOES_NOT_EXIST": "无效的导出目录",
"EXPORT_DIRECTORY_DOES_NOT_EXIST_MESSAGE": "<p>您选择的导出目录不存在。</p><p> 请选择一个有效的目录。</p>",
"SUBSCRIPTION_VERIFICATION_ERROR": "订阅验证失败",
"STORAGE_UNITS": {
"B": "B",
"KB": "KB",
"MB": "MB",
"GB": "GB",
"TB": "TB"
"storage_unit": {
"b": "B",
"kb": "KB",
"mb": "MB",
"gb": "GB",
"tb": "TB"
},
"AFTER_TIME": {
"HOUR": "1小时后",