#117 Autodetect languages
Merged 4 years ago by asamalik. Opened 4 years ago by jibecfed.
fedora-docs/ jibecfed/docs-fp-o stg  into  stg

file modified
+9 -1
@@ -1,6 +1,14 @@ 

  #!/bin/bash

  

- languages="cs fr jp"

+ languages=""

+ 

+ for file in site-*;

+ do

+     # we have site-???.yml, we want ???

+     suffix=${file:5} # remove "site-"

+     lang=${suffix%.yml}   # remove ".yml"

+     languages="$languages $lang"

+ done

  

  create_language_menu() {

      {

@@ -0,0 +1,48 @@ 

+ #!/usr/bin/env python3

+ """Prepare site.yml for each translated sites"""

+ 

+ import os

+ import subprocess

+ import tempfile

+ import yaml

+ 

+ def main():

+     """ Read site.yml content, replace `sources` content with localized content"""

+     lang_sources = get_language_sources()

+ 

+     with open("site.yml", 'r') as stream:

+         data_loaded = yaml.load(stream, Loader=yaml.SafeLoader)

+ 

+     for lang in lang_sources:

+         print(lang)

+ 

+         with open('site-'+lang+'.yml', 'w') as outfile:

+             data_loaded['content']['sources'] = lang_sources[lang]

+             yaml.dump(data_loaded, outfile, default_flow_style=False)

+ 

+ 

+ def get_language_sources():

+     """ Get the list of languages + modules + branches from translated-sources"""

+     sources = {}

+     with tempfile.TemporaryDirectory() as tmp:

+         t_sources_url = "https://pagure.io/fedora-docs/translated-sources.git"

+         subprocess.run(["git", "clone", t_sources_url], check=True, cwd=tmp)

+ 

+         path = tmp+"/translated-sources"

+ 

+         # we don't want ".git" folder

+         langs = [d for d in next(os.walk(path))[1] if not d[0] == '.']

+         for lang in langs:

+             sources[lang] = []

+             for module in next(os.walk(path+"/"+lang))[1]:

+                 for branch in next(os.walk(path+"/"+lang + "/" + module))[1]:

+                     hop = {}

+                     hop["url"] = t_sources_url

+                     hop["start_path"] = lang+"/"+module+"/"+branch

+                     sources[lang].append(hop)

+ 

+     return sources

+ 

+ 

+ if __name__ == '__main__':

+     main()

file modified
+72 -133
@@ -1,141 +1,80 @@ 

- site: 

-   title: Fedora Docs Site 

-   url: https://docs.fedoraproject.org

-   start_page: docs::index.adoc

+ asciidoc:

+   extensions:

+   - ./lib/extensions/package-inline-macro.js

  content:

    branches: master

    sources:

- ##### Translated sources #####

- 

-   - url: https://pagure.io/fedora-docs/translated-sources.git

-     start_path: cs/project/master

-   - url: https://pagure.io/fedora-docs/translated-sources.git

-     start_path: cs/docs/master

-   - url: https://pagure.io/fedora-docs/translated-sources.git

-     start_path: cs/quick-docs/master

-   - url: https://pagure.io/fedora-docs/translated-sources.git

-     start_path: cs/engineering/master

-   - url: https://pagure.io/fedora-docs/translated-sources.git

-     start_path: cs/badges/master

-   - url: https://pagure.io/fedora-docs/translated-sources.git

-     start_path: cs/containers/master

-   - url: https://pagure.io/fedora-docs/translated-sources.git

-     start_path: cs/mentored-projects/master

-   - url: https://pagure.io/fedora-docs/translated-sources.git

-     start_path: cs/fedora-silverblue/master

-   - url: https://pagure.io/fedora-docs/translated-sources.git

-     start_path: cs/diversity-inclusion/master

-   - url: https://pagure.io/fedora-docs/translated-sources.git

-     start_path: cs/fesco/master

-   - url: https://pagure.io/fedora-docs/translated-sources.git

-     start_path: cs/neurofedora/master

-   - url: https://pagure.io/fedora-docs/translated-sources.git

-     start_path: cs/fedora/rawhide

-   - url: https://pagure.io/fedora-docs/translated-sources.git

-     start_path: cs/fedora/f28

-   - url: https://pagure.io/fedora-docs/translated-sources.git

-     start_path: cs/fedora/f26

-   - url: https://pagure.io/fedora-docs/translated-sources.git

-     start_path: cs/fedora/f29

-   - url: https://pagure.io/fedora-docs/translated-sources.git

-     start_path: cs/fedora/f27

-   - url: https://pagure.io/fedora-docs/translated-sources.git

-     start_path: cs/teleirc-sig/master

-   - url: https://pagure.io/fedora-docs/translated-sources.git

-     start_path: cs/remix-building/master

-   - url: https://pagure.io/fedora-docs/translated-sources.git

-     start_path: cs/java-packaging-howto/master

-   - url: https://pagure.io/fedora-docs/translated-sources.git

-     start_path: cs/mindshare/master

-   - url: https://pagure.io/fedora-docs/translated-sources.git

-     start_path: cs/iot/master

-   - url: https://pagure.io/fedora-docs/translated-sources.git

-     start_path: cs/modularity/master

-   - url: https://pagure.io/fedora-docs/translated-sources.git

-     start_path: cs/mindshare-committee/master

-   - url: https://pagure.io/fedora-docs/translated-sources.git

-     start_path: cs/packaging-guidelines/master

-   - url: https://pagure.io/fedora-docs/translated-sources.git

-     start_path: cs/flatpak/master

-   - url: https://pagure.io/fedora-docs/translated-sources.git

-     start_path: cs/commops/master

-   - url: https://pagure.io/fedora-docs/translated-sources.git

-     start_path: cs/fedora-docs/master

-   - url: https://pagure.io/fedora-docs/translated-sources.git

-     start_path: cs/council/master

- 

- ##### Original sources #####

- # (Translated pieces are commented out)

- 

- #  - url: .

- #    start_path: pages/homepage

- #   - url: .

- #     start_path: pages/engineering

- #   - url: .

- #     start_path: pages/mindshare

- #   - url: https://pagure.io/fedora-docs/release-docs-home.git

- #     branches:

- #     - master

- #    - f29

- #    - f28

- #     - f27

- #     - f26

- #   - url: https://pagure.io/fedora-docs/install-guide.git

- #     branches:

- #     - master

- #    - f29

- #    - f28

- #     - f27

- #     - f26

- #   - url: https://pagure.io/fedora-docs/system-administrators-guide.git

- #     branches:

- #     - master

- #     - f29

- #     - f28

- #     - f27

- #     - f26

- #   - url: https://pagure.io/fedora-docs/release-notes.git

- #     branches:

- #     - master

- #    - f29

- #    - f28

- #     - f27

- #     - f26

- #   - url: https://pagure.io/fedora-docs/quick-docs.git

- #   - url: https://pagure.io/mentored-projects.git

- #   - url: https://pagure.io/fedora-commops.git

- #     start_path: docs

- #   - url: https://pagure.io/Fedora-Council/council-docs.git

- #     start_path: council

- #   - url: https://pagure.io/Fedora-Council/council-docs.git

- #     start_path: project

- #   - url: https://pagure.io/fedora-docs/modularity.git

- #   - url: https://pagure.io/fedora-docs/documentation-contributors-guide.git

- #   - url: https://pagure.io/fedora-docs/flatpak.git

- #   - url: https://pagure.io/fedora-diversity.git

- #   - url: https://pagure.io/packaging-committee.git

- #     start_path: guidelines

- #   - url: https://pagure.io/mindshare.git

- #     start_path: website

- #   - url: https://pagure.io/fesco/fesco-docs.git

- #     start_path: fesco

- #   - url: https://pagure.io/fedora-iot/iot-docs.git

- #   - url: https://pagure.io/fedora-badges.git

- #     start_path: docs

+   - start_path: cs/teleirc-sig/master

+     url: https://pagure.io/fedora-docs/translated-sources.git

+   - start_path: cs/remix-building/master

+     url: https://pagure.io/fedora-docs/translated-sources.git

+   - start_path: cs/quick-docs/master

+     url: https://pagure.io/fedora-docs/translated-sources.git

+   - start_path: cs/project/master

+     url: https://pagure.io/fedora-docs/translated-sources.git

+   - start_path: cs/packaging-guidelines/master

+     url: https://pagure.io/fedora-docs/translated-sources.git

+   - start_path: cs/neurofedora/master

+     url: https://pagure.io/fedora-docs/translated-sources.git

+   - start_path: cs/modularity/master

+     url: https://pagure.io/fedora-docs/translated-sources.git

+   - start_path: cs/mindshare/master

+     url: https://pagure.io/fedora-docs/translated-sources.git

+   - start_path: cs/mindshare-committee/master

+     url: https://pagure.io/fedora-docs/translated-sources.git

+   - start_path: cs/mentored-projects/master

+     url: https://pagure.io/fedora-docs/translated-sources.git

+   - start_path: cs/java-packaging-howto/master

+     url: https://pagure.io/fedora-docs/translated-sources.git

+   - start_path: cs/iot/master

+     url: https://pagure.io/fedora-docs/translated-sources.git

+   - start_path: cs/flatpak/master

+     url: https://pagure.io/fedora-docs/translated-sources.git

+   - start_path: cs/fesco/master

+     url: https://pagure.io/fedora-docs/translated-sources.git

+   - start_path: cs/fedora/rawhide

+     url: https://pagure.io/fedora-docs/translated-sources.git

+   - start_path: cs/fedora/f29

+     url: https://pagure.io/fedora-docs/translated-sources.git

+   - start_path: cs/fedora/f28

+     url: https://pagure.io/fedora-docs/translated-sources.git

+   - start_path: cs/fedora/f27

+     url: https://pagure.io/fedora-docs/translated-sources.git

+   - start_path: cs/fedora/f26

+     url: https://pagure.io/fedora-docs/translated-sources.git

+   - start_path: cs/fedora-silverblue/master

+     url: https://pagure.io/fedora-docs/translated-sources.git

+   - start_path: cs/fedora-docs/master

+     url: https://pagure.io/fedora-docs/translated-sources.git

+   - start_path: cs/engineering/master

+     url: https://pagure.io/fedora-docs/translated-sources.git

+   - start_path: cs/docs/master

+     url: https://pagure.io/fedora-docs/translated-sources.git

+   - start_path: cs/diversity-inclusion/master

+     url: https://pagure.io/fedora-docs/translated-sources.git

+   - start_path: cs/council/master

+     url: https://pagure.io/fedora-docs/translated-sources.git

+   - start_path: cs/containers/master

+     url: https://pagure.io/fedora-docs/translated-sources.git

+   - start_path: cs/commops/master

+     url: https://pagure.io/fedora-docs/translated-sources.git

+   - start_path: cs/badges/master

+     url: https://pagure.io/fedora-docs/translated-sources.git

+ output:

+   clean: true

+   destinations:

+   - provider: archive

+   dir: ./public/en-US

+ runtime:

+   cache_dir: ./cache

+   pull: true

+ site:

+   start_page: docs::index.adoc

+   title: Fedora Docs Site

+   url: https://docs.fedoraproject.org/en-US/

  ui:

    bundle:

-     url: https://asamalik.fedorapeople.org/docs-translations/ui-bundle.zip

      snapshot: true

+     url: https://asamalik.fedorapeople.org/docs-translations/ui-bundle.zip

    default_layout: with_menu

    supplemental_files: ./supplemental-ui

- output: 

-   clean: true 

-   dir: ./public/cs

-   destinations: 

-   - provider: archive 

- runtime:

-   pull: true

-   cache_dir: ./cache

- asciidoc:

-   extensions:

-   - ./lib/extensions/package-inline-macro.js

file modified
+76 -133
@@ -1,141 +1,84 @@ 

- site: 

-   title: Fedora Docs Site 

-   url: https://docs.fedoraproject.org

-   start_page: docs::index.adoc

+ asciidoc:

+   extensions:

+   - ./lib/extensions/package-inline-macro.js

  content:

    branches: master

    sources:

- ##### Translated sources #####

- 

-   - url: https://pagure.io/fedora-docs/translated-sources.git

-     start_path: fr/project/master

-   - url: https://pagure.io/fedora-docs/translated-sources.git

-     start_path: fr/docs/master

-   - url: https://pagure.io/fedora-docs/translated-sources.git

-     start_path: fr/quick-docs/master

-   - url: https://pagure.io/fedora-docs/translated-sources.git

-     start_path: fr/engineering/master

-   - url: https://pagure.io/fedora-docs/translated-sources.git

-     start_path: fr/badges/master

-   - url: https://pagure.io/fedora-docs/translated-sources.git

-     start_path: fr/containers/master

-   - url: https://pagure.io/fedora-docs/translated-sources.git

-     start_path: fr/mentored-projects/master

-   - url: https://pagure.io/fedora-docs/translated-sources.git

-     start_path: fr/fedora-silverblue/master

-   - url: https://pagure.io/fedora-docs/translated-sources.git

-     start_path: fr/diversity-inclusion/master

-   - url: https://pagure.io/fedora-docs/translated-sources.git

-     start_path: fr/fesco/master

-   - url: https://pagure.io/fedora-docs/translated-sources.git

-     start_path: fr/neurofedora/master

-   - url: https://pagure.io/fedora-docs/translated-sources.git

-     start_path: fr/fedora/rawhide

-   - url: https://pagure.io/fedora-docs/translated-sources.git

-     start_path: fr/fedora/f28

-   - url: https://pagure.io/fedora-docs/translated-sources.git

-     start_path: fr/fedora/f26

-   - url: https://pagure.io/fedora-docs/translated-sources.git

-     start_path: fr/fedora/f29

-   - url: https://pagure.io/fedora-docs/translated-sources.git

-     start_path: fr/fedora/f27

-   - url: https://pagure.io/fedora-docs/translated-sources.git

-     start_path: fr/teleirc-sig/master

-   - url: https://pagure.io/fedora-docs/translated-sources.git

-     start_path: fr/remix-building/master

-   - url: https://pagure.io/fedora-docs/translated-sources.git

-     start_path: fr/java-packaging-howto/master

-   - url: https://pagure.io/fedora-docs/translated-sources.git

-     start_path: fr/mindshare/master

-   - url: https://pagure.io/fedora-docs/translated-sources.git

-     start_path: fr/iot/master

-   - url: https://pagure.io/fedora-docs/translated-sources.git

-     start_path: fr/modularity/master

-   - url: https://pagure.io/fedora-docs/translated-sources.git

-     start_path: fr/mindshare-committee/master

-   - url: https://pagure.io/fedora-docs/translated-sources.git

-     start_path: fr/packaging-guidelines/master

-   - url: https://pagure.io/fedora-docs/translated-sources.git

-     start_path: fr/flatpak/master

-   - url: https://pagure.io/fedora-docs/translated-sources.git

-     start_path: fr/commops/master

-   - url: https://pagure.io/fedora-docs/translated-sources.git

-     start_path: fr/fedora-docs/master

-   - url: https://pagure.io/fedora-docs/translated-sources.git

-     start_path: fr/council/master

- 

- ##### Original sources #####

- # (Translated pieces are commented out)

- 

- #  - url: .

- #    start_path: pages/homepage

- #   - url: .

- #     start_path: pages/engineering

- #   - url: .

- #     start_path: pages/mindshare

- #   - url: https://pagure.io/fedora-docs/release-docs-home.git

- #     branches:

- #     - master

- #    - f29

- #    - f28

- #     - f27

- #     - f26

- #   - url: https://pagure.io/fedora-docs/install-guide.git

- #     branches:

- #     - master

- #    - f29

- #    - f28

- #     - f27

- #     - f26

- #   - url: https://pagure.io/fedora-docs/system-administrators-guide.git

- #     branches:

- #     - master

- #     - f29

- #     - f28

- #     - f27

- #     - f26

- #   - url: https://pagure.io/fedora-docs/release-notes.git

- #     branches:

- #     - master

- #    - f29

- #    - f28

- #     - f27

- #     - f26

- #   - url: https://pagure.io/fedora-docs/quick-docs.git

- #   - url: https://pagure.io/mentored-projects.git

- #   - url: https://pagure.io/fedora-commops.git

- #     start_path: docs

- #   - url: https://pagure.io/Fedora-Council/council-docs.git

- #     start_path: council

- #   - url: https://pagure.io/Fedora-Council/council-docs.git

- #     start_path: project

- #   - url: https://pagure.io/fedora-docs/modularity.git

- #   - url: https://pagure.io/fedora-docs/documentation-contributors-guide.git

- #   - url: https://pagure.io/fedora-docs/flatpak.git

- #   - url: https://pagure.io/fedora-diversity.git

- #   - url: https://pagure.io/packaging-committee.git

- #     start_path: guidelines

- #   - url: https://pagure.io/mindshare.git

- #     start_path: website

- #   - url: https://pagure.io/fesco/fesco-docs.git

- #     start_path: fesco

- #   - url: https://pagure.io/fedora-iot/iot-docs.git

- #   - url: https://pagure.io/fedora-badges.git

- #     start_path: docs

+   - start_path: fr/teleirc-sig/master

+     url: https://pagure.io/fedora-docs/translated-sources.git

+   - start_path: fr/taiga-docs/master

+     url: https://pagure.io/fedora-docs/translated-sources.git

+   - start_path: fr/remix-building/master

+     url: https://pagure.io/fedora-docs/translated-sources.git

+   - start_path: fr/quick-docs/master

+     url: https://pagure.io/fedora-docs/translated-sources.git

+   - start_path: fr/project/master

+     url: https://pagure.io/fedora-docs/translated-sources.git

+   - start_path: fr/packaging-guidelines/master

+     url: https://pagure.io/fedora-docs/translated-sources.git

+   - start_path: fr/neurofedora/master

+     url: https://pagure.io/fedora-docs/translated-sources.git

+   - start_path: fr/modularity/master

+     url: https://pagure.io/fedora-docs/translated-sources.git

+   - start_path: fr/mindshare/master

+     url: https://pagure.io/fedora-docs/translated-sources.git

+   - start_path: fr/mindshare-committee/master

+     url: https://pagure.io/fedora-docs/translated-sources.git

+   - start_path: fr/mentored-projects/master

+     url: https://pagure.io/fedora-docs/translated-sources.git

+   - start_path: fr/java-packaging-howto/master

+     url: https://pagure.io/fedora-docs/translated-sources.git

+   - start_path: fr/iot/master

+     url: https://pagure.io/fedora-docs/translated-sources.git

+   - start_path: fr/flatpak/master

+     url: https://pagure.io/fedora-docs/translated-sources.git

+   - start_path: fr/fesco/master

+     url: https://pagure.io/fedora-docs/translated-sources.git

+   - start_path: fr/fedora/rawhide

+     url: https://pagure.io/fedora-docs/translated-sources.git

+   - start_path: fr/fedora/f29

+     url: https://pagure.io/fedora-docs/translated-sources.git

+   - start_path: fr/fedora/f28

+     url: https://pagure.io/fedora-docs/translated-sources.git

+   - start_path: fr/fedora/f27

+     url: https://pagure.io/fedora-docs/translated-sources.git

+   - start_path: fr/fedora/f26

+     url: https://pagure.io/fedora-docs/translated-sources.git

+   - start_path: fr/fedora-silverblue/master

+     url: https://pagure.io/fedora-docs/translated-sources.git

+   - start_path: fr/fedora-docs/master

+     url: https://pagure.io/fedora-docs/translated-sources.git

+   - start_path: fr/engineering/master

+     url: https://pagure.io/fedora-docs/translated-sources.git

+   - start_path: fr/docs/master

+     url: https://pagure.io/fedora-docs/translated-sources.git

+   - start_path: fr/diversity-inclusion/master

+     url: https://pagure.io/fedora-docs/translated-sources.git

+   - start_path: fr/council/master

+     url: https://pagure.io/fedora-docs/translated-sources.git

+   - start_path: fr/containers/master

+     url: https://pagure.io/fedora-docs/translated-sources.git

+   - start_path: fr/commops/master

+     url: https://pagure.io/fedora-docs/translated-sources.git

+   - start_path: fr/ci/master

+     url: https://pagure.io/fedora-docs/translated-sources.git

+   - start_path: fr/badges/master

+     url: https://pagure.io/fedora-docs/translated-sources.git

+ output:

+   clean: true

+   destinations:

+   - provider: archive

+   dir: ./public/en-US

+ runtime:

+   cache_dir: ./cache

+   pull: true

+ site:

+   start_page: docs::index.adoc

+   title: Fedora Docs Site

+   url: https://docs.fedoraproject.org/en-US/

  ui:

    bundle:

-     url: https://asamalik.fedorapeople.org/docs-translations/ui-bundle.zip

      snapshot: true

+     url: https://asamalik.fedorapeople.org/docs-translations/ui-bundle.zip

    default_layout: with_menu

    supplemental_files: ./supplemental-ui

- output: 

-   clean: true 

-   dir: ./public/fr

-   destinations: 

-   - provider: archive 

- runtime:

-   pull: true

-   cache_dir: ./cache

- asciidoc:

-   extensions:

-   - ./lib/extensions/package-inline-macro.js

file added
+80
@@ -0,0 +1,80 @@ 

+ asciidoc:

+   extensions:

+   - ./lib/extensions/package-inline-macro.js

+ content:

+   branches: master

+   sources:

+   - start_path: ja/teleirc-sig/master

+     url: https://pagure.io/fedora-docs/translated-sources.git

+   - start_path: ja/remix-building/master

+     url: https://pagure.io/fedora-docs/translated-sources.git

+   - start_path: ja/quick-docs/master

+     url: https://pagure.io/fedora-docs/translated-sources.git

+   - start_path: ja/project/master

+     url: https://pagure.io/fedora-docs/translated-sources.git

+   - start_path: ja/packaging-guidelines/master

+     url: https://pagure.io/fedora-docs/translated-sources.git

+   - start_path: ja/neurofedora/master

+     url: https://pagure.io/fedora-docs/translated-sources.git

+   - start_path: ja/modularity/master

+     url: https://pagure.io/fedora-docs/translated-sources.git

+   - start_path: ja/mindshare/master

+     url: https://pagure.io/fedora-docs/translated-sources.git

+   - start_path: ja/mindshare-committee/master

+     url: https://pagure.io/fedora-docs/translated-sources.git

+   - start_path: ja/mentored-projects/master

+     url: https://pagure.io/fedora-docs/translated-sources.git

+   - start_path: ja/java-packaging-howto/master

+     url: https://pagure.io/fedora-docs/translated-sources.git

+   - start_path: ja/iot/master

+     url: https://pagure.io/fedora-docs/translated-sources.git

+   - start_path: ja/flatpak/master

+     url: https://pagure.io/fedora-docs/translated-sources.git

+   - start_path: ja/fesco/master

+     url: https://pagure.io/fedora-docs/translated-sources.git

+   - start_path: ja/fedora/rawhide

+     url: https://pagure.io/fedora-docs/translated-sources.git

+   - start_path: ja/fedora/f29

+     url: https://pagure.io/fedora-docs/translated-sources.git

+   - start_path: ja/fedora/f28

+     url: https://pagure.io/fedora-docs/translated-sources.git

+   - start_path: ja/fedora/f27

+     url: https://pagure.io/fedora-docs/translated-sources.git

+   - start_path: ja/fedora/f26

+     url: https://pagure.io/fedora-docs/translated-sources.git

+   - start_path: ja/fedora-silverblue/master

+     url: https://pagure.io/fedora-docs/translated-sources.git

+   - start_path: ja/fedora-docs/master

+     url: https://pagure.io/fedora-docs/translated-sources.git

+   - start_path: ja/engineering/master

+     url: https://pagure.io/fedora-docs/translated-sources.git

+   - start_path: ja/docs/master

+     url: https://pagure.io/fedora-docs/translated-sources.git

+   - start_path: ja/diversity-inclusion/master

+     url: https://pagure.io/fedora-docs/translated-sources.git

+   - start_path: ja/council/master

+     url: https://pagure.io/fedora-docs/translated-sources.git

+   - start_path: ja/containers/master

+     url: https://pagure.io/fedora-docs/translated-sources.git

+   - start_path: ja/commops/master

+     url: https://pagure.io/fedora-docs/translated-sources.git

+   - start_path: ja/badges/master

+     url: https://pagure.io/fedora-docs/translated-sources.git

+ output:

+   clean: true

+   destinations:

+   - provider: archive

+   dir: ./public/en-US

+ runtime:

+   cache_dir: ./cache

+   pull: true

+ site:

+   start_page: docs::index.adoc

+   title: Fedora Docs Site

+   url: https://docs.fedoraproject.org/en-US/

+ ui:

+   bundle:

+     snapshot: true

+     url: https://asamalik.fedorapeople.org/docs-translations/ui-bundle.zip

+   default_layout: with_menu

+   supplemental_files: ./supplemental-ui

file removed
-141
@@ -1,141 +0,0 @@ 

- site: 

-   title: Fedora Docs Site 

-   url: https://docs.fedoraproject.org

-   start_page: docs::index.adoc

- content:

-   branches: master

-   sources:

- ##### Translated sources #####

- 

-   - url: https://pagure.io/fedora-docs/translated-sources.git

-     start_path: jp/project/master

-   - url: https://pagure.io/fedora-docs/translated-sources.git

-     start_path: jp/docs/master

-   - url: https://pagure.io/fedora-docs/translated-sources.git

-     start_path: jp/quick-docs/master

-   - url: https://pagure.io/fedora-docs/translated-sources.git

-     start_path: jp/engineering/master

-   - url: https://pagure.io/fedora-docs/translated-sources.git

-     start_path: jp/badges/master

-   - url: https://pagure.io/fedora-docs/translated-sources.git

-     start_path: jp/containers/master

-   - url: https://pagure.io/fedora-docs/translated-sources.git

-     start_path: jp/mentored-projects/master

-   - url: https://pagure.io/fedora-docs/translated-sources.git

-     start_path: jp/fedora-silverblue/master

-   - url: https://pagure.io/fedora-docs/translated-sources.git

-     start_path: jp/diversity-inclusion/master

-   - url: https://pagure.io/fedora-docs/translated-sources.git

-     start_path: jp/fesco/master

-   - url: https://pagure.io/fedora-docs/translated-sources.git

-     start_path: jp/neurofedora/master

-   - url: https://pagure.io/fedora-docs/translated-sources.git

-     start_path: jp/fedora/rawhide

-   - url: https://pagure.io/fedora-docs/translated-sources.git

-     start_path: jp/fedora/f28

-   - url: https://pagure.io/fedora-docs/translated-sources.git

-     start_path: jp/fedora/f26

-   - url: https://pagure.io/fedora-docs/translated-sources.git

-     start_path: jp/fedora/f29

-   - url: https://pagure.io/fedora-docs/translated-sources.git

-     start_path: jp/fedora/f27

-   - url: https://pagure.io/fedora-docs/translated-sources.git

-     start_path: jp/teleirc-sig/master

-   - url: https://pagure.io/fedora-docs/translated-sources.git

-     start_path: jp/remix-building/master

-   - url: https://pagure.io/fedora-docs/translated-sources.git

-     start_path: jp/java-packaging-howto/master

-   - url: https://pagure.io/fedora-docs/translated-sources.git

-     start_path: jp/mindshare/master

-   - url: https://pagure.io/fedora-docs/translated-sources.git

-     start_path: jp/iot/master

-   - url: https://pagure.io/fedora-docs/translated-sources.git

-     start_path: jp/modularity/master

-   - url: https://pagure.io/fedora-docs/translated-sources.git

-     start_path: jp/mindshare-committee/master

-   - url: https://pagure.io/fedora-docs/translated-sources.git

-     start_path: jp/packaging-guidelines/master

-   - url: https://pagure.io/fedora-docs/translated-sources.git

-     start_path: jp/flatpak/master

-   - url: https://pagure.io/fedora-docs/translated-sources.git

-     start_path: jp/commops/master

-   - url: https://pagure.io/fedora-docs/translated-sources.git

-     start_path: jp/fedora-docs/master

-   - url: https://pagure.io/fedora-docs/translated-sources.git

-     start_path: jp/council/master

- 

- ##### Original sources #####

- # (Translated pieces are commented out)

- 

- #  - url: .

- #    start_path: pages/homepage

- #   - url: .

- #     start_path: pages/engineering

- #   - url: .

- #     start_path: pages/mindshare

- #   - url: https://pagure.io/fedora-docs/release-docs-home.git

- #     branches:

- #     - master

- #    - f29

- #    - f28

- #     - f27

- #     - f26

- #   - url: https://pagure.io/fedora-docs/install-guide.git

- #     branches:

- #     - master

- #    - f29

- #    - f28

- #     - f27

- #     - f26

- #   - url: https://pagure.io/fedora-docs/system-administrators-guide.git

- #     branches:

- #     - master

- #     - f29

- #     - f28

- #     - f27

- #     - f26

- #   - url: https://pagure.io/fedora-docs/release-notes.git

- #     branches:

- #     - master

- #    - f29

- #    - f28

- #     - f27

- #     - f26

- #   - url: https://pagure.io/fedora-docs/quick-docs.git

- #   - url: https://pagure.io/mentored-projects.git

- #   - url: https://pagure.io/fedora-commops.git

- #     start_path: docs

- #   - url: https://pagure.io/Fedora-Council/council-docs.git

- #     start_path: council

- #   - url: https://pagure.io/Fedora-Council/council-docs.git

- #     start_path: project

- #   - url: https://pagure.io/fedora-docs/modularity.git

- #   - url: https://pagure.io/fedora-docs/documentation-contributors-guide.git

- #   - url: https://pagure.io/fedora-docs/flatpak.git

- #   - url: https://pagure.io/fedora-diversity.git

- #   - url: https://pagure.io/packaging-committee.git

- #     start_path: guidelines

- #   - url: https://pagure.io/mindshare.git

- #     start_path: website

- #   - url: https://pagure.io/fesco/fesco-docs.git

- #     start_path: fesco

- #   - url: https://pagure.io/fedora-iot/iot-docs.git

- #   - url: https://pagure.io/fedora-badges.git

- #     start_path: docs

- ui:

-   bundle:

-     url: https://asamalik.fedorapeople.org/docs-translations/ui-bundle.zip

-     snapshot: true

-   default_layout: with_menu

-   supplemental_files: ./supplemental-ui

- output: 

-   clean: true 

-   dir: ./public/jp

-   destinations: 

-   - provider: archive 

- runtime:

-   pull: true

-   cache_dir: ./cache

- asciidoc:

-   extensions:

-   - ./lib/extensions/package-inline-macro.js

Existing problems:

  • we had to manually generate a yml file for each language and keeping it up to date
  • we had to list languages for the language button

Solution:

  • used the translate-sources to generate a list of site.yml file for each languages
  • use the list of site.yml files to list languages to build

Pull-Request has been merged by asamalik

4 years ago