diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..76a01c0d8af9e07a98dd6de5b084207e0e64094d --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +translation-install/ +public/ +public.new/ +.vscode/ diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ece1ee351dc7398e1d02aa54cbbd2c4fcf26c397..c0b7400b2ab19d653db3c10a1f1720e046bf3e89 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,8 +1,22 @@ +image: 'registry.fedoraproject.org/fedora:43' +variables: + GIT_SUBMODULE_STRATEGY: recursive + +translate: + stage: build + script: + - dnf install --assumeyes meson gettext glibc-all-langpacks python3-lxml python3-polib + - meson setup builddir + - meson install -C builddir + - ./html-translation/build.py -p index.html -p about.html -a privacy-policy.html -a img -a js -a style.css + artifacts: + paths: + - public + pages: stage: deploy script: - - mkdir ./public - - cp -R ./{about.html,index.html,privacy-policy.html,img,js,style.css} ./public + - find public artifacts: paths: - public diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000000000000000000000000000000000000..14f9206efa51a3e462e3cd9b32c8754886841e22 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "html-translation"] + path = html-translation + url = https://gitlab.gnome.org/Teams/Websites/tools/html-translation.git diff --git a/README.md b/README.md index 33d8179c31141148e13aef5171004d36ccecdcad..3559a76dd1f7dcb3e68e69a3e5eb2a7b6deecd22 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ # Gnome.org Website Maintenance -Welcome to the Gnome.org website maintenance guide. This document contains instructions on how to maintain the static HTML website of Gnome.org. +Welcome to the [Gnome.org](www.gnome.org) website maintenance guide. This document contains instructions on how to maintain the static HTML website of Gnome.org. ## About the Gnome.org Website @@ -39,12 +39,25 @@ The sponsor logos are SVG. Before including the SVG in the page, shorten and san ## Local Testing -To ensure the javascript runs and links work correctly (site uses smart URLs), a local server is needed. We've provided a simple web server in python. To launch it in the project folder: +To ensure the javascript runs, links work correctly, and translations are available, the website has to be built to the `/public` folder using `./generate.py` and then served: +```sh +./generate.py +python3 -m http.server -d public ``` -python3 ./test.py + +For simpler development work, the untranslated website can be used: + +```sh +python3 -m http.server ``` +## Translations + +The `po/www.gnome.org.pot` file will be updated by `./generate.py` if strings changed. These changes have to be commited to the repository for new or changed strings to become translatable. + +The page can be translated on our translation system [Damned Lies](https://l10n.gnome.org/module/www-gnome-org/). + ## Deployment The GitLab CI will deal with site deployment. Once you have pushed the changes to the main branch, GitLab CI will automatically build and deploy the website to the live server. diff --git a/about.html b/about.html index eb02ccd64df489705f1b3f52078274c2499aca8a..9caacb3d8beff882038b6176f11a8e7cd42da237 100644 --- a/about.html +++ b/about.html @@ -39,12 +39,13 @@
+
+