Can't extract strings defined in a function #178
-
|
I have a helper to fetch strings. The strings are defined in a function that returns a big object of strings first. /**
* Returns a nested object containing all i18n messages.
* Follows wuchale extraction rules (https://wuchale.dev/guides/rules/).
*/
export const getMessages = () => {
return {
common: {
other: 'その他'
},
profile: {
gender: {
title: '性別を教えてください。',
male: '男性',
female: '女性'
}
},
test: {}
} as const;
};…but my strings aren't extracted. Can anyone tell me why these wouldn't be extracted? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
|
It seems perharps the code doesn't consider kanji as a "non-letter" character or it fails some check to see if it starts with a uppercase letter, since kanji and hiragana don't have uppercase/lowercase? I'm referring to this rule: Have you tried, using romaji to see what happens? |
Beta Was this translation helpful? Give feedback.
-
|
Hi @brandonpittman, actually I tried it and it works on my end. Do you use a custom heuristic? Can you paste your config? |
Beta Was this translation helpful? Give feedback.
-
|
I think taking |
Beta Was this translation helpful? Give feedback.
I think taking
as constoff fixed this a while back.