Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
3nids committed Feb 13, 2024
1 parent 89c7b45 commit b1bde93
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/website.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down
16 changes: 8 additions & 8 deletions website/.tx/config
Original file line number Diff line number Diff line change
@@ -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.<lang>.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.<lang>.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.<lang>.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.<lang>.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.<lang>.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.<lang>.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.<lang>.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.<lang>.md
source_file = documentation/contribute.fr.md
source_lang = fr
Expand Down
3 changes: 1 addition & 2 deletions website/scripts/transifex_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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")
Expand Down

0 comments on commit b1bde93

Please sign in to comment.