Skip to content

Commit a479950

Browse files
Merge pull request #439 from N1ebieski/Fix-for-getTranslationPathByName-with-nested-translations-#53
Fix for getTranslationPathByName with nested translations
2 parents e456d27 + 11038d6 commit a479950

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/repositories/translations.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ export const getTranslationPathByName = (
8484
): string | undefined => {
8585
lang = lang ?? getTranslations().items.default;
8686

87-
const fileName = match.replace(/^.*::/, "").replace(/\.[^.]+$/, "");
87+
const fileName = match.replace(/^.*::/, "").replace(/^([^.]+)\..*$/, "$1");
8888

8989
return getTranslations().items.paths.find((path) => {
9090
return (

0 commit comments

Comments
 (0)