Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/docker-ci.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzorn-v <zorn7@yandex.ru>2022-10-30 14:25:37 +0300
committerGitHub <noreply@github.com>2022-10-30 14:25:37 +0300
commitdf9c8b92bbf2340f8be9f33c59d51f4071b5847b (patch)
treee67b88134a0e0acd7db27d75a30291eb6d7ca471
parent8109b94ba1735548365aebb7d5dc88e64c15c1c0 (diff)
Fix extract translatables from vue files
Fixes https://github.com/nextcloud/docker-ci/issues/457 Signed-off-by: zorn-v <zorn7@yandex.ru>
-rw-r--r--translations/translationtool/src/translationtool.php12
1 files changed, 6 insertions, 6 deletions
diff --git a/translations/translationtool/src/translationtool.php b/translations/translationtool/src/translationtool.php
index 684da01..ce0976f 100644
--- a/translations/translationtool/src/translationtool.php
+++ b/translations/translationtool/src/translationtool.php
@@ -327,9 +327,9 @@ class TranslatableApp {
}
// t
- preg_match_all("/\Wt\s*\(\s*'([\w]+)',\s*'(.+)'/", $vueSource, $singleQuoteMatches);
- preg_match_all("/\Wt\s*\(\s*\"([\w]+)\",\s*\"(.+)\"/", $vueSource, $doubleQuoteMatches);
- preg_match_all("/\Wt\s*\(\s*\'([\w]+)\'\s*,\s*\`(.+)\`\s*\)/msU", $vueSource, $templateQuoteMatches);
+ preg_match_all("/\Wt\s*\(\s*'?([\w]+)'?,\s*'(.+)'/", $vueSource, $singleQuoteMatches);
+ preg_match_all("/\Wt\s*\(\s*\"?([\w]+)\"?,\s*\"(.+)\"/", $vueSource, $doubleQuoteMatches);
+ preg_match_all("/\Wt\s*\(\s*\'?([\w]+)\'?\s*,\s*\`(.+)\`\s*\)/msU", $vueSource, $templateQuoteMatches);
$matches0 = array_merge($singleQuoteMatches[0], $doubleQuoteMatches[0], $templateQuoteMatches[0]);
$matches2 = array_merge($singleQuoteMatches[2], $doubleQuoteMatches[2], $templateQuoteMatches[2]);
foreach (array_keys($matches2) as $k) {
@@ -339,9 +339,9 @@ class TranslatableApp {
}
// n
- preg_match_all("/\Wn\s*\(\s*'([\w]+)',\s*'(.+)'\s*,\s*'(.+)'\s*(.+)/", $vueSource, $singleQuoteMatches);
- preg_match_all("/\Wn\s*\(\s*\"([\w]+)\",\s*\"(.+)\"\s*,\s*\"(.+)\"\s*(.+)/", $vueSource, $doubleQuoteMatches);
- preg_match_all("/\Wn\s*\(\s*\'([\w]+)\'\s*,\s*\`(.+)\`\s*,\s*\`(.+)\`\s*\)/msU", $vueSource, $templateQuoteMatches);
+ preg_match_all("/\Wn\s*\(\s*'?([\w]+)'?,\s*'(.+)'\s*,\s*'(.+)'\s*(.+)/", $vueSource, $singleQuoteMatches);
+ preg_match_all("/\Wn\s*\(\s*\"?([\w]+)\"?,\s*\"(.+)\"\s*,\s*\"(.+)\"\s*(.+)/", $vueSource, $doubleQuoteMatches);
+ preg_match_all("/\Wn\s*\(\s*\'?([\w]+)\'?\s*,\s*\`(.+)\`\s*,\s*\`(.+)\`\s*\)/msU", $vueSource, $templateQuoteMatches);
$matches0 = array_merge($singleQuoteMatches[0], $doubleQuoteMatches[0], $templateQuoteMatches[0]);
$matches2 = array_merge($singleQuoteMatches[2], $doubleQuoteMatches[2], $templateQuoteMatches[2]);
$matches3 = array_merge($singleQuoteMatches[3], $doubleQuoteMatches[3], $templateQuoteMatches[3]);