#140 enable language switch button on english page
Merged 3 years ago by pbokoc. Opened 3 years ago by jibecfed.
fedora-docs/ jibecfed/docs-fp-o prod  into  prod

file modified
+3 -23
@@ -266,22 +266,9 @@ 

              if e.errno != errno.EEXIST:

                  raise

  

-         # FIXME: Bootstrapping production deployment

-         # To get this in production, I need to hide all the languages from the

-         # menu on the English site, because the link would be broken for the first

-         # few hours, as the translated content takes much longer to build.

-         # 

-         # So, by commenting this out, it'll use the default file that only

-         # has "en-US" in it. And I copy this to the translated part,

-         # so those pages all get the right language menu.

-         #

-         # And I revert this when the translated site is built, and the

-         # link would no longer be broken.

-         # 

-         # FIXME When reverting this, look for the other #FIXME below

-         #ui_file = os.path.join(ui_dir, "page-languages.hbs")

-         #with open(ui_file, "w") as file:

-         #    file.write(lang_switch_ui)

+         ui_file = os.path.join(ui_dir, "page-languages.hbs")

+         with open(ui_file, "w") as file:

+             file.write(lang_switch_ui)

  

          # Timestamp to be included in the footer of the docs

          timestamp = datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S UTC')
@@ -329,13 +316,6 @@ 

          #####  Translated site build               #####

          #####--------------------------------------#####

  

-         # FIXME: Bootstrapping production deployment

-         # This is the second part of the temporary change.

-         # Look at the previous FIXME for more details

-         ui_file = os.path.join(ui_dir, "page-languages.hbs")

-         with open(ui_file, "w") as file:

-             file.write(lang_switch_ui)

- 

  

          if config["build_langs"] == "translated" or config["build_langs"] == "all":

  

the build is now table, end users can now use it
promotion article is in review process

tested locally with time podman run --rm -it -e "BUILD_ENV=prod" -e "BUILD_LANGS=english" -v $(pwd)/output:/antora/output:Z fedora-docs-openshift-rebuild

Pull-Request has been merged by pbokoc

3 years ago
Metadata