diff --git a/ftl/extract-strings.py b/ftl/extract-strings.py index fff3fce96..700526449 100644 --- a/ftl/extract-strings.py +++ b/ftl/extract-strings.py @@ -14,7 +14,7 @@ from fluent.syntax import parse from fluent.syntax.ast import Junk from fluent.syntax.serializer import serialize_element -root = os.environ["BUILD_WORKSPACE_DIRECTORY"] +root = ".." ftl_files = glob.glob(os.path.join(root, "ftl", "core", "*.ftl"), recursive=True) keys_by_value: dict[str, list[str]] = {} diff --git a/ftl/transform-string.py b/ftl/transform-string.py index 525d9fc6f..7a9d03d91 100644 --- a/ftl/transform-string.py +++ b/ftl/transform-string.py @@ -12,7 +12,7 @@ import os from fluent.syntax import parse, serialize from fluent.syntax.ast import Junk -template_root = os.environ["BUILD_WORKSPACE_DIRECTORY"] +template_root = ".." template_files = glob.glob( os.path.join(template_root, "ftl", "*", "*.ftl"), recursive=True ) @@ -34,7 +34,7 @@ def transform_string_in_file(path): raise Exception(f"file had junk! {path} {ent}") if getattr(ent, "id", None): key = ent.id.name - for (target_key, src, dst) in target_repls: + for target_key, src, dst in target_repls: if key == target_key: for elem in ent.value.elements: newval = elem.value.replace(src, dst)