Skip to content

Commit 7b80f53

Browse files
committed
do never translate the base language english
1 parent 5f33a16 commit 7b80f53

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

scripts/translate-pages.php

+8
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@
1010
$config = Yaml::parseFile(__DIR__ . '/../_config.yml');
1111

1212
$languages = $config['languages'];
13+
// english is the base language, do not touch it
14+
$key = array_search('en', $languages, true);
15+
if ($key !== false) {
16+
unset($languages[$key]);
17+
}
1318
// while working on a specific translation, use this one:
1419
//$languages = ['ta'];
1520

@@ -55,6 +60,9 @@
5560
foreach ($files as $file) {
5661
$baseFileName = basename($file);
5762
foreach ($languages as $language) {
63+
if ($language === 'en') {
64+
continue;
65+
}
5866
$langPath = $basePath . '/' . $language;
5967
$langTargetFile = $langPath . '/' . $baseFileName;
6068
$relTarget = $language . '/' . $baseFileName;

0 commit comments

Comments
 (0)