Skip to content

Commit b1d9c48

Browse files
authored
Account for root folder in project config (#44)
1 parent e94da8f commit b1d9c48

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

l10n/android_l10n.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,12 @@ def __init__(self, l10n_path, reference_locale):
4949
def extractStringsToml(self):
5050
"""Extract strings using TOML configuration."""
5151

52-
basedir = os.path.dirname(self.l10n_path)
5352
if not os.path.exists(self.l10n_path):
5453
sys.exit("Specified TOML file does not exist.")
5554
project_config_paths = L10nConfigPaths(
5655
self.l10n_path, locale_map={"android_locale": get_android_locale}
5756
)
57+
basedir = project_config_paths.base
5858
reference_cache = {}
5959

6060
locales = list(project_config_paths.all_locales)

l10n/fluent_l10n.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -106,10 +106,10 @@ def removeObsoleteStrings(self, locale):
106106
def extractStringsToml(self):
107107
"""Extract strings using TOML configuration."""
108108

109-
basedir = os.path.dirname(self.l10n_path)
110109
if not os.path.exists(self.l10n_path):
111110
sys.exit("Specified TOML file does not exist.")
112111
project_config_paths = L10nConfigPaths(self.l10n_path)
112+
basedir = project_config_paths.base
113113

114114
locales = list(project_config_paths.all_locales)
115115
locales.sort()

0 commit comments

Comments
 (0)