Skip to content

Commit

Permalink
refactor: update language code to ar-SA
Browse files Browse the repository at this point in the history
  • Loading branch information
gao-sun committed Aug 26, 2024
1 parent 41ee881 commit 0779cc9
Show file tree
Hide file tree
Showing 102 changed files with 13 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .changeset/young-moons-deny.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
"@logto/phrases": minor
---

add ar-AR language (credit to @zaaakher)
add ar-SA language (credit to @zaaakher)
6 changes: 3 additions & 3 deletions packages/phrases-experience/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { languages, fallback } from '@logto/language-kit';
import type { NormalizeKeyPaths } from '@silverhand/essentials';
import { z } from 'zod';

import arAR from './locales/ar-ar/index.js';
import arSA from './locales/ar-sa/index.js';
import de from './locales/de/index.js';
import en from './locales/en/index.js';
import es from './locales/es/index.js';
Expand All @@ -26,7 +26,7 @@ export type { LocalePhrase } from './types.js';
export type I18nKey = NormalizeKeyPaths<typeof en.translation>;

export const builtInLanguages = [
'ar-AR',
'ar-SA',
'de',
'en',
'es',
Expand Down Expand Up @@ -56,7 +56,7 @@ export type BuiltInLanguageTag = z.infer<typeof builtInLanguageTagGuard>;
export type Resource = Record<BuiltInLanguageTag, LocalePhrase>;

const resource: Resource = {
'ar-AR': arAR,
'ar-SA': arSA,
de,
en,
es,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import mfa from './mfa.js';
import secondary from './secondary.js';
import user_scopes from './user-scopes.js';

const ar_ar = {
const ar_sa = {
translation: {
input,
secondary,
Expand All @@ -26,4 +26,4 @@ const ar_ar = {
},
} satisfies DeepPartial<LocalePhrase>;

export default Object.freeze(ar_ar);
export default Object.freeze(ar_sa);
6 changes: 3 additions & 3 deletions packages/phrases/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { languages, fallback } from '@logto/language-kit';
import type { DeepPartial, NormalizeKeyPaths } from '@silverhand/essentials';
import { z } from 'zod';

import arAR from './locales/ar-ar/index.js';
import arSA from './locales/ar-sa/index.js';
import de from './locales/de/index.js';
import en from './locales/en/index.js';
import es from './locales/es/index.js';
Expand All @@ -27,7 +27,7 @@ export type DefaultLocale = 'en';
export type I18nKey = NormalizeKeyPaths<typeof en.translation>;

export const builtInLanguages = [
'ar-AR',
'ar-SA',
'de',
'en',
'es',
Expand Down Expand Up @@ -74,7 +74,7 @@ export type Resource = Record<
};

const resource: Resource = {
'ar-AR': arAR,
'ar-SA': arSA,
de,
en,
es,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import type { LocalePhrase } from '../../types.js';
import errors from './errors/index.js';
import translation from './translation/index.js';

const ar_ar = {
const ar_sa = {
translation,
errors,
} satisfies DeepPartial<LocalePhrase>;

export default Object.freeze(ar_ar);
export default Object.freeze(ar_sa);
3 changes: 2 additions & 1 deletion packages/toolkit/language-kit/src/const.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
export const languages = Object.freeze({
'af-ZA': 'Afrikaans',
'am-ET': 'አማርኛ',
'ar-AR': 'العربية',
'ar-AR': 'العربية (مهجورة)',
'ar-SA': 'العربية',
'as-IN': 'অসমীয়া',
'az-AZ': 'Azərbaycan dili',
'be-BY': 'Беларуская',
Expand Down

0 comments on commit 0779cc9

Please sign in to comment.