From b1bde93cab61ed6d8768466b88926330810e826e Mon Sep 17 00:00:00 2001 From: Denis Rouzaud Date: Tue, 13 Feb 2024 11:21:02 +0100 Subject: [PATCH] fix --- .github/workflows/website.yml | 2 +- website/.tx/config | 16 ++++++++-------- website/scripts/transifex_utils.py | 3 +-- 3 files changed, 10 insertions(+), 11 deletions(-) diff --git a/.github/workflows/website.yml b/.github/workflows/website.yml index b34c3079..908f9124 100644 --- a/.github/workflows/website.yml +++ b/.github/workflows/website.yml @@ -24,7 +24,7 @@ defaults: working-directory: website jobs: - deploy: + website: runs-on: ubuntu-latest # Skip if this job was scheduled and the runner belongs to a fork (i.e. forks have no use for this action) if: (github.event_name == 'schedule' && github.repository == 'opengisch/QField-docs') || (github.event_name != 'schedule') diff --git a/website/.tx/config b/website/.tx/config index 32ed6c72..c35a6bff 100644 --- a/website/.tx/config +++ b/website/.tx/config @@ -1,49 +1,49 @@ [main] host = https://www.transifex.com -[o::p::r:tx_slug: documentation_desktop] +[o:opengisch:p:signalo-website:r:tx_slug: documentation_desktop] file_filter = documentation/desktop..md source_file = documentation/desktop.fr.md source_lang = fr type = GITHUBMARKDOWN -[o::p::r:tx_slug: documentation_roadmap] +[o:opengisch:p:signalo-website:r:tx_slug: documentation_roadmap] file_filter = documentation/roadmap..md source_file = documentation/roadmap.fr.md source_lang = fr type = GITHUBMARKDOWN -[o::p::r:tx_slug: documentation_mobile] +[o:opengisch:p:signalo-website:r:tx_slug: documentation_mobile] file_filter = documentation/mobile..md source_file = documentation/mobile.fr.md source_lang = fr type = GITHUBMARKDOWN -[o::p::r:tx_slug: documentation_installation] +[o:opengisch:p:signalo-website:r:tx_slug: documentation_installation] file_filter = documentation/installation..md source_file = documentation/installation.fr.md source_lang = fr type = GITHUBMARKDOWN -[o::p::r:tx_slug: documentation_home] +[o:opengisch:p:signalo-website:r:tx_slug: documentation_home] file_filter = documentation/index..md source_file = documentation/index.fr.md source_lang = fr type = GITHUBMARKDOWN -[o::p::r:tx_slug: documentation_datamodel-doc] +[o:opengisch:p:signalo-website:r:tx_slug: documentation_datamodel-doc] file_filter = documentation/datamodel-doc..md source_file = documentation/datamodel-doc.fr.md source_lang = fr type = GITHUBMARKDOWN -[o::p::r:tx_slug: documentation_data-model] +[o:opengisch:p:signalo-website:r:tx_slug: documentation_data-model] file_filter = documentation/data-model..md source_file = documentation/data-model.fr.md source_lang = fr type = GITHUBMARKDOWN -[o::p::r:tx_slug: documentation_contribute] +[o:opengisch:p:signalo-website:r:tx_slug: documentation_contribute] file_filter = documentation/contribute..md source_file = documentation/contribute.fr.md source_lang = fr diff --git a/website/scripts/transifex_utils.py b/website/scripts/transifex_utils.py index 08445420..ff24775f 100755 --- a/website/scripts/transifex_utils.py +++ b/website/scripts/transifex_utils.py @@ -31,7 +31,7 @@ def create_transifex_config(): # Get relative path of file relative_path = os.path.relpath(file, start=root) - tx_slugs = [re.match(r"^tx_slug: (.*)", line) for line in open(file)] + tx_slugs = [re.match(r"^tx_slug: +(.*)", line) for line in open(file)] tx_slugs = [t for t in tx_slugs if t] if not tx_slugs: @@ -41,7 +41,6 @@ def create_transifex_config(): print(f"More than 1 TX slug found for {relative_path}") if tx_slugs: - print(tx_slugs) tx_slug = tx_slugs[0].group(0) print(f"Found file with tx_slug defined: {relative_path}, {tx_slug}") f.write(f"[o:{TX_ORGANIZATION}:p:{TX_PROJECT}:r:{tx_slug}]\n")