Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Persian translation #8

Open
21 of 24 tasks
mmdbalkhi opened this issue Dec 7, 2021 · 7 comments
Open
21 of 24 tasks

Add Persian translation #8

mmdbalkhi opened this issue Dec 7, 2021 · 7 comments
Labels

Comments

@mmdbalkhi
Copy link
Member

mmdbalkhi commented Dec 7, 2021

Language: Persian

Hi. My name is Komeil Parseh. I request to add the Persian translation of Flask's documentation.

Initial tasks

  • Create an empty repository on GitHub. Name the repository as flask-docs-<lang code>, for example, flask-docs-es.
  • Set up your repository based on the translation template repository:
$ git clone https://github.com/flaskcwg/translation-template.git flask-docs-<lang code>
$ cd flask-docs-<lang code>
$ git remote set-url origin <the-Git-URL-to-your-repository>
$ git remote add upstream https://github.com/pallets/flask.git
$ git fetch upstream
$ git merge upstream/2.1.x
$ git push -u origin main
  • Create a virtual environment, then install the requirements:
$ python -m pip install --upgrade pip setuptools
$ pip install -r requirements/dev.txt
$ pip install sphinx-intl
$ pip install -e .
$ pre-commit install
  • Generate the .pot and .po files (replace <lang code> with your language code):
$ cd docs
$ make gettext  # use ".\make.bat gettext" on Windows
$ sphinx-intl update -p _build/gettext -l <lang code>
  • Replace the <LANG> in the README.md, the language config, and the
    html_search_language config in docs/conf.py with your language code.
    Update the .po file examples.
  • Setup ReadtheDocs to connect your repository, use flask-<lang code> as the subdomain, set the default version to the main branch, and enable the "single version" mode.
  • Translate the README.md and the pull request template (optional).
  • Update the title, and all the <UPDATE THIS> placeholders in README.md and docs/conf.py. You can update the README.md to add more format or translate tips for your language.
  • You can choose to use Transifex or other translation platforms. In that case, you will need to rewrite the "Contributing Guide" in the README.md.
  • Update the Language-Team value in all .po files.
  • Translate html_title and project links in the docs/conf.py file.
  • Translate the docs/index file (you can make a localized logo for the index page).
  • Translate the docs/foreword file.
  • Translate the docs/advanced-foreword file.
  • Translate the docs/installation file.
  • Translate the docs/quickstart file.
  • Translate the "Tutorial" part of the docs.
  • Switch the repository into the flaskcwg organization. See HERE.

Public

Tasks after the repository is switched into flaskcwg:

Maintenance

Tasks when the whole documentation is translated:

  • Create a 2.2.x branch, set it as default version on ReadtheDocs.
  • Rewrite the contributing guide in the README.md of the translation repository, and encourage people to fetch upstream and update docs (see details below).
  • Rename the section "Translation To-do List" to "Translators". You can also add
    a "Reviewers" section.
  • Switch the docs into http://flask.palletsprojects.com/.

You should sync documentation updates from Flask periodically:

$ git fetch upstream
$ git merge upstream/2.1.x
$ cd docs
$ make gettext  # use ".\make.bat gettext" on Windows
$ sphinx-intl update -p _build/gettext

Then update the translation for new changes.

@mmdbalkhi
Copy link
Member Author

Hi @greyli

Please explain these two more. I did not know exactly what to do.
Update the Language-Team value in all .po files. and You can choose to use Transifex or other translation platforms. In that case, you will need to rewrite the "Contributing Guide" in the README.md.

@greyli
Copy link
Member

greyli commented Dec 8, 2021

Update the Language-Team value in all .po files.

Take this file for example, echo po file contains a "Language-Team" field, update the value to "lang code <your email>".

You can choose to use Transifex or other translation platforms. In that case, you will need to rewrite the "Contributing Guide" in the README.md.

The current Contributing Guide is for manual translation flow. If you use Transifex or other platforms, the collaborate method will be different, refer to the docs of the specific platform for more details.

@mmdbalkhi
Copy link
Member Author

The current Contributing Guide is for manual translation flow. If you use Transifex or other platforms, the collaborate method will be different, refer to the docs of the specific platform for more details.

So the second case is optional?(You can choose to use Transifex or other translation platforms. In that case, you will need to rewrite the "Contributing Guide" in the README.md.)

@greyli
Copy link
Member

greyli commented Dec 8, 2021

Yes, it's optional.

@Abdur-rahmaanJ
Copy link
Member

Abdur-rahmaanJ commented Jan 3, 2022

@mmdbalkhi See steps at https://flaskcwg.github.io/faq/migrate-doc-translation-repo-to-flaskcwg-org/

Else join: https://discord.gg/pallets and ping @appinv in #random channel

@mmdbalkhi
Copy link
Member Author

@greyli @Abdur-rahmaanJ If possible, make this visible to the public. Thanks

https://github.com/orgs/flaskcwg/projects/1

@greyli
Copy link
Member

greyli commented Jun 20, 2022

@greyli @Abdur-rahmaanJ If possible, make this visible to the public. Thanks

github.com/orgs/flaskcwg/projects/1

Done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants