Skip to content

Commit

Permalink
feat(core): Improved translations
Browse files Browse the repository at this point in the history
Closes #839
  • Loading branch information
Wanztwurst authored Apr 22, 2021
1 parent 2046143 commit a8ca019
Show file tree
Hide file tree
Showing 7 changed files with 111 additions and 114 deletions.
12 changes: 6 additions & 6 deletions packages/admin-ui/src/lib/static/i18n-messages/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -137,10 +137,10 @@
"sku": "Artikelnummer",
"slug": "Slug",
"slug-pattern-error": "Ungültiger Slug",
"stock-allocated": "Bestand reserviert",
"stock-allocated": "Lagerbestand reserviert",
"stock-allocated-tooltip": "Anzahl der Artikel, die bereits bestellt, aber noch nicht abgewickelt wurden",
"stock-on-hand": "Bestand",
"stock-on-hand-tooltip": "Bestand dieses Artikels im Lager",
"stock-on-hand": "Lagerbestand",
"stock-on-hand-tooltip": "Lagerbestand dieses Artikels",
"stock-saleable": "Verkaufbar",
"stock-saleable-tooltip": "Anzahl der verkauftbaren Einheiten dieses Artikels; berücksichtigt reservierte Artikel und eingestellte Fehlmenge",
"tax-category": "Steuerkategorie",
Expand Down Expand Up @@ -365,8 +365,8 @@
"could-not-connect-to-server": "Es konnte keine Verbindung zum Vendure-Server auf { url } hergestellt werden.",
"facet-value-form-values-do-not-match": "Die Anzahl der Werte im Facetten-Formular stimmt nicht mit der tatsächlichen Anzahl der Werte überein",
"health-check-failed": "Systemzustandsprüfung fehlgeschlagen",
"no-default-shipping-zone-set": "Dieser Kanal hat keine Standard-Versandzone. Dies kann zu Fehlern bei der Berechnung der Auftragsversandkosten führen.",
"no-default-tax-zone-set": "Dieser Kanal verfügt nicht über ein Standard-Steuerzone, was zu Fehlern bei der Preisberechnung führen kann. Bitte erstellen oder wählen Sie eine Zone.",
"no-default-shipping-zone-set": "Dieser Kanal verfügt nicht über eine Standard-Versandzone. Dies kann zu Fehlern bei der Berechnung der Auftragsversandkosten führen.",
"no-default-tax-zone-set": "Dieser Kanal verfügt nicht über eine Standard-Steuerzone, was zu Fehlern bei der Preisberechnung führen kann. Bitte erstellen oder wählen Sie eine Zone.",
"product-variant-form-values-do-not-match": "Die Anzahl der Varianten im Produktformular stimmt nicht mit der tatsächlichen Anzahl der Varianten überein."
},
"lang": {
Expand Down Expand Up @@ -762,7 +762,7 @@
"test-result": "Test-Ergebnis",
"test-shipping-method": "Test-Versandart",
"test-shipping-methods": "Test-Versandarten",
"track-inventory-default": "Bestand standardmäßig verfolgen",
"track-inventory-default": "Lagerbestand standardmäßig verfolgen",
"update-zone": "Zone aktualisieren",
"view-zone-members": "Mitglieder anzeigen",
"zone": "Zone"
Expand Down
2 changes: 1 addition & 1 deletion packages/core/e2e/configurable-operation.e2e-spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ describe('Configurable operations', () => {
},
},
);
}, "The argument 'required' is required, but the value is [null]"),
}, "The argument 'required' is required"),
);
});

Expand Down
2 changes: 1 addition & 1 deletion packages/core/e2e/product.e2e-spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1301,7 +1301,7 @@ describe('Product resolver', () => {
],
},
);
}, 'A ProductVariant already exists with the options:'),
}, 'A ProductVariant with the selected options already exists: Variant 1'),
);

it('updateProductVariants updates variants', async () => {
Expand Down
201 changes: 100 additions & 101 deletions packages/core/src/i18n/messages/de.json

Large diffs are not rendered by default.

5 changes: 2 additions & 3 deletions packages/core/src/i18n/messages/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"collection-id-or-slug-must-be-provided": "Either the Collection id or slug must be provided",
"collection-id-slug-mismatch": "The provided id and slug refer to different Collections",
"conditions-required-for-action": "The PromotionAction '{ action }' requires the following conditions: { conditions }",
"configurable-argument-is-required": "The argument '{ name }' is required, but the value is [{ value }]",
"configurable-argument-is-required": "The argument '{ name }' is required",
"country-code-not-valid": "The countryCode \"{ countryCode }\" was not recognized",
"customer-does-not-belong-to-customer-group": "Customer does not belong to this CustomerGroup",
"default-channel-not-found": "Default channel not found",
Expand Down Expand Up @@ -40,13 +40,12 @@
"product-id-or-slug-must-be-provided": "Either the Product id or slug must be provided",
"product-id-slug-mismatch": "The provided id and slug refer to different Products",
"product-variant-option-ids-not-compatible": "ProductVariant optionIds must include one optionId from each of the groups: {groupNames}",
"product-variant-options-combination-already-exists": "A ProductVariant already exists with the options: {optionNames}",
"product-variant-options-combination-already-exists": "A ProductVariant with the selected options already exists: {variantName}",
"promotion-channels-can-only-be-changed-from-default-channel": "Promotions channels may only be changed from the Default Channel",
"stockonhand-cannot-be-negative": "stockOnHand cannot be a negative value",
"unauthorized": "The credentials did not match. Please check and try again"
},
"errorResult": {
"ALREADY_CANCELLED_ERROR": "Quantity to cancel is greater than existing OrderLine quantity",
"ALREADY_LOGGED_IN_ERROR": "Cannot set a Customer for the Order when already logged in",
"ALREADY_REFUNDED_ERROR": "Cannot refund an OrderItem which has already been refunded",
"CANCEL_ACTIVE_ORDER_ERROR": "Cannot cancel OrderLines from an Order in the \"{ orderState }\" state",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,6 @@ export class ConfigArgService {
if (val == null) {
throw new UserInputError('error.configurable-argument-is-required', {
name,
value: String(val),
});
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -723,7 +723,7 @@ export class ProductVariantService {
const variantOptionIds = this.sortJoin(variant.options, ',', 'id');
if (variantOptionIds === inputOptionIds) {
throw new UserInputError('error.product-variant-options-combination-already-exists', {
optionNames: this.sortJoin(variant.options, ', ', 'code'),
variantName: translateDeep(variant, ctx.languageCode).name,
});
}
});
Expand Down

0 comments on commit a8ca019

Please sign in to comment.