mirror of
https://github.com/arsvendg/Stirling-PDF.git
synced 2026-07-16 19:33:11 +02:00
fix: Use frontend/editor for locales paths (#6483)
This commit is contained in:
@@ -184,7 +184,7 @@ def check_for_differences(reference_file, file_list, branch, actor):
|
|||||||
if len(file_list) == 1:
|
if len(file_list) == 1:
|
||||||
file_arr = file_list[0].split()
|
file_arr = file_list[0].split()
|
||||||
|
|
||||||
base_dir = Path.cwd() / "frontend" / "public" / "locales"
|
base_dir = Path.cwd() / "frontend" / "editor" / "public" / "locales"
|
||||||
|
|
||||||
for file_path in file_arr:
|
for file_path in file_arr:
|
||||||
file_path = Path(file_path)
|
file_path = Path(file_path)
|
||||||
@@ -372,6 +372,7 @@ if __name__ == "__main__":
|
|||||||
os.path.join(
|
os.path.join(
|
||||||
os.getcwd(),
|
os.getcwd(),
|
||||||
"frontend",
|
"frontend",
|
||||||
|
"editor",
|
||||||
"public",
|
"public",
|
||||||
"locales",
|
"locales",
|
||||||
"*",
|
"*",
|
||||||
|
|||||||
@@ -345,7 +345,7 @@ def main() -> None:
|
|||||||
|
|
||||||
# Project layout assumptions
|
# Project layout assumptions
|
||||||
cwd = os.getcwd()
|
cwd = os.getcwd()
|
||||||
locales_dir = os.path.join(cwd, "frontend", "public", "locales")
|
locales_dir = os.path.join(cwd, "frontend", "editor", "public", "locales")
|
||||||
reference_file = os.path.join(locales_dir, "en-GB", "translation.toml")
|
reference_file = os.path.join(locales_dir, "en-GB", "translation.toml")
|
||||||
scripts_directory = os.path.join(cwd, "scripts")
|
scripts_directory = os.path.join(cwd, "scripts")
|
||||||
translation_state_file = os.path.join(scripts_directory, "ignore_translation.toml")
|
translation_state_file = os.path.join(scripts_directory, "ignore_translation.toml")
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ import tomli_w
|
|||||||
class TranslationMerger:
|
class TranslationMerger:
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
locales_dir: str = os.path.join(os.getcwd(), "frontend", "public", "locales"),
|
locales_dir: str = os.path.join(os.getcwd(), "frontend", "editor", "public", "locales"),
|
||||||
ignore_file: str = os.path.join(
|
ignore_file: str = os.path.join(
|
||||||
os.getcwd(), "scripts", "ignore_translation.toml"
|
os.getcwd(), "scripts", "ignore_translation.toml"
|
||||||
),
|
),
|
||||||
@@ -371,7 +371,7 @@ def main():
|
|||||||
)
|
)
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
"--locales-dir",
|
"--locales-dir",
|
||||||
default=os.path.join(os.getcwd(), "frontend", "public", "locales"),
|
default=os.path.join(os.getcwd(), "frontend", "editor", "public", "locales"),
|
||||||
help="Path to locales directory",
|
help="Path to locales directory",
|
||||||
)
|
)
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
|
|||||||
Reference in New Issue
Block a user