Skip to content

Commit

Permalink
feat(note): support he-IL, es-ES, fr-FR, cs-CZ, ar-SA langs (#365)
Browse files Browse the repository at this point in the history
* feat(note): support he-IL, es-ES, fr-FR, cs-CZ, ar-SA langs
  • Loading branch information
martyanovandrey committed Feb 1, 2024
1 parent 124211b commit a925e1b
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 1 deletion.
30 changes: 30 additions & 0 deletions src/transform/plugins/notes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,36 @@ const titles: Record<string, Record<string, string>> = {
alert: 'Alert',
warning: 'Warning',
},
ar: {
info: 'ملاحظة',
tip: 'نصيحة',
alert: 'انتباه',
warning: 'هام',
},
cs: {
info: 'Poznámka',
tip: 'Tip',
alert: 'Upozornění',
warning: 'Varování',
},
fr: {
info: 'Remarque',
tip: 'Astuce',
alert: 'Alerte',
warning: 'Avertissement',
},
es: {
info: 'Nota',
tip: 'Consejo',
alert: 'Alerta',
warning: 'Aviso',
},
he: {
info: 'מידע',
tip: 'טיפ',
alert: 'התראה',
warning: 'אזהרה',
},
};

function getTitle(type: string, originLang: keyof typeof titles) {
Expand Down
2 changes: 1 addition & 1 deletion src/transform/plugins/typings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import type {MarkdownIt} from '../typings';
export interface MarkdownItPluginOpts {
path: string;
log: Logger;
lang: 'ru' | 'en';
lang: 'ru' | 'en' | 'es' | 'fr' | 'cs' | 'ar' | 'he';
root: string;
isLintRun: boolean;
}
Expand Down

0 comments on commit a925e1b

Please sign in to comment.