1
0
Fork 0
mirror of https://github.com/mealie-recipes/mealie.git synced 2025-07-22 06:39:41 +02:00

add nuxt localization

This commit is contained in:
hay-kot 2021-08-07 11:28:20 -08:00
parent 695d7e96ae
commit c13fb6743c
3 changed files with 116 additions and 5 deletions

View file

@ -0,0 +1,38 @@
from pathlib import Path
from pprint import pprint
PROJECT_DIR = Path(__file__).parent.parent.parent
datetime_dir = PROJECT_DIR / "frontend" / "lang" / "dateTimeFormats"
locales_dir = PROJECT_DIR / "datetime" / "lang" / "messages"
"""
{
code: "en-US",
file: "en-US.json",
}
"en-US": require("./lang/dateTimeFormats/en-US.json"),
"""
def main():
print("Starting...")
all_langs = []
for match in datetime_dir.glob("*.json"):
print(f'"{match.stem}": require("./lang/dateTimeFormats/{match.name}"),')
all_langs.append({"code": match.stem, "file": match.name})
print("\n\n\n--------- All Languages -----------")
pprint(all_langs)
print("Finished...")
if __name__ == "__main__":
main()