Skip to content

Commit

Permalink
chore(locales): fix parsing for some languages
Browse files Browse the repository at this point in the history
  • Loading branch information
rhahao committed Nov 9, 2024
1 parent e6aad9f commit a749a8b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/common/parsing_rules.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ export const extractSourceEnhanced = (src: string, lang: string) => {

// separate minutes from title
const firstPatternCommon = new RegExp(
`(.+?)(?:: )?[((](\\d+)(?: | )?(?:${variations})[))](?: : | |. )?(.+?)?$`,
'giu'
);

const firstPatternCommonPGW = new RegExp(
`(.+?)(?:: )?[((](\\d+)(?: | )?(?:${variations})[))]?(?: : | |. )?(.+?)?$`,
'giu'
);
Expand All @@ -29,6 +34,7 @@ export const extractSourceEnhanced = (src: string, lang: string) => {

const firstPattern: LangRegExp = {
common: firstPatternCommon,
PGW: firstPatternCommonPGW,
SW: firstPatternTW,
TW: firstPatternTW,
};
Expand Down

0 comments on commit a749a8b

Please sign in to comment.