Code Monkey home page Code Monkey logo

webpage's Introduction

New fortran-lang.org website

Contributing

Setup

Build fortran-lang.org site (Sphinx Version)

This assumes that you already have a recent version of python For example on Ubuntu 20.04, do:

To install the dependencies of this project, use commamd:

pip3 install --user -r requirements.txt

To install sphinx (if system is not able to recognize sphinx-build after installing requirements) :

First check :

sphinx-build --version

if not recognized then run:

pip install -U sphinx

Build the site by invoking

python3 build.py

The website will be built in build/html and can be previewed by starting a webserver and opening the page with a browser (e.g. firefox, chromium or similar):

python3 -m http.server -d build/html

By default all languages will be built. To limit the build to a single language subtree, i.e. English, use

python3 build.py en

After adding a new entry to package index, run the github action fortran_packages before building the sphinx build.

Activating the pre-commit hooks for Black and Pylint:

This assumes that you already have a cloned the main branch of this repository. Steps to activate the pre-commit hooks are:

  1. Make sure that you have installed all the dependencies of the repository.
pip3 install --user -r requirements.txt
  1. Activate the pre-commit hooks:
pre-commit install

Now, the precommit hooks have been successfully been installed into your clone.

Steps to debug/resolve issues which prevent the commit due to pre-commit hooks:

  1. if pylint causes the issues in commiting to the repo, and it seems mandatory to skip the pre-commit hooks use:
SKIP=pylint git commit -m"my commit"`
  1. if black causes the issues in commiting to the repo, and it seems mandatory to skip the pre-commit hooks use:
SKIP=black git commit -m"my commit"

Translating via weblate

Translations can be contributed via weblate.

Translation status

Update or add translations

The documentation uses the sphinx-intl utility to generate websites for multiple languages. It generates *.po files, which contain the original sentences and a placeholder for translations.

To update translations run

python3 intl.py

if you only want to update a single translation add LANGUAGES=de to the command. This command will generate the message catalog (*.pot) and update the *.po files in the locale directory of the respective translations. Then edit the *.po files, e.g. locale/de/LC_MESSAGES/index.po. In the *.po files are paragraphs like

#: ../../pages/index.md:16
msgid "Package manager and build system for Fortran"
msgstr ""

The first line describes the file and line where to find the original text.

The second line is the original text. Don't edit this line, edit the original document instead.

The third line is meant for the translation.

To continue a long string in another line, simply close the string in the current line with " and open another one in the line underneath. E.g.

msgstr "This is "
"one string"

don't forget a space between 'is' and 'one'

After adding or updating translations build the documentation as described above.

License

This project is free software: you can redistribute it and/or modify it under the terms of the MIT license.

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an as is basis, without warranties or conditions of any kind, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in this repository by you, shall be licensed as above, without any additional terms or conditions.

webpage's People

Contributors

zoziha avatar henilp105 avatar ntimesgurgel avatar awvwgk avatar euler-37 avatar vmagnin avatar band-a-prend avatar syx-413 avatar 14ngiestas avatar aslozada avatar dependabot[bot] avatar chen850512337 avatar ioutora avatar ecasglez avatar st-maxwell avatar msz59 avatar urbanjost avatar ralf-burghardt avatar ansatzx avatar gnikit avatar jalvesz avatar wangrry97 avatar milancurcic avatar asmitdash avatar adobe-android avatar dragonpara avatar tinyboxvk avatar santossi avatar nbelakovski avatar 1234zou avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.