Differences between revisions 5 and 8 (spanning 3 versions)
Revision 5 as of 2015-11-30 10:38:49
Size: 3572
Editor: PaulWise
Comment: better to not-hardcode usernames
Revision 8 as of 2018-09-27 07:27:57
Size: 4724
Editor: LauraArjona
Comment: Update translation instructions to Salsa, and include how to work without using git
Deletions are marked like this. Additions are marked like this.
Line 5: Line 5:
== Get your alioth access ready == == Get the English file you want to translate ==
Line 7: Line 7:
If you don't have account in Alioth, the Debian source code forge, create one account:
https://alioth.debian.org/account/register.php
The blog articles are written using MarkDown and these "source code" files are hosted in a git repository in Salsa, the Debian source code forge. You can use git and Salsa to work with translations, or you can just download the MarkDown file that you want to translate, translate it, and send it to your language team for review and upload, if you prefer to work without using Git or Salsa.

=== Get the file without using Git/Salsa ===

Get the markdown file of the article you want to translate from here: https://salsa.debian.org/publicity-team/bits/tree/master/content

(e.g. for the article about Debian 25 anniversary you can go to https://salsa.debian.org/publicity-team/bits/blob/master/content/2018/debian-is-25.md and then press the "Download" button).

=== Get the file using Git/Salsa ===

If you prefer to work with Salsa, Debian's Gitlab instance, but still don't have account, create a guest account:
https://signup.salsa.debian.org/
Line 11: Line 21:
Set up your ssh key: follow the instructions [[Alioth/SSH#SSH_access_on_alioth.debian.org_.28AKA_svn.debian.org.29Alioth.2FSSH|here]] and [[https://wiki.debian.org/Alioth/SSH#How_to_handle_differing_username|here]]. Then login and go to the Publicity group in Salsa: https://salsa.debian.org/publicity-team
Line 13: Line 23:
Then request joining the Publicity project in Alioth: https://alioth.debian.org/projects/publicity/ You can fork the "bits" repository (create a local copy in your userspace in Salsa), and send Merge Requests with your contributions, or request to join the Publicity group to get commit permissions directly in the bits repo.
Line 15: Line 25:
If you are Debian Developer, you already have commit access, no need to join the publicity project in Alioth. If you are Debian Developer, you already have commit access, no need to join the publicity group in Salsa.
Line 17: Line 27:
== Get the git repository ==

http://bits.debian.org is handled via git. You will need to install git in your machine.
If this is the first time you are working with git, you will need to install git in your machine.
Line 23: Line 31:
    `$ git clone ssh://git.debian.org/git/publicity/bits.git`     `$ git clone git@salsa.debian.org:publicity-team/bits.git`

or if you prefer to work with your fork and send merge requests via salsa, type:

    `$ git clone git@salsa.debian.org:your_username-guest/bits.git`
Line 29: Line 41:
2. Create a branch for your language if it doesn't exist already. Use the name of your languange in English.

3.1. The branch exists already, just do:

    `$ git checkout spanish`

change Spanish for the name of your language.

3.2. The branch doesn't exist, create it:

    `$ git checkout -b spanish`

change Spanish for the name of your language.
(or if you forked, the repo, see https://about.gitlab.com/2016/12/01/how-to-keep-your-fork-up-to-date-with-its-origin/ to configure your fork to be up-to-date with the Publicity team repository).
Line 45: Line 45:
1. Browse the posts under content/ and choose the post you want to translate.
If you work inside a established translation group, they might have a process to reserve the file you want to translate.
1. If you work inside a established translation group, they might have a process to reserve the file you want to translate; please follow it.
Line 48: Line 47:
2. Copy the post you want to translate adding the suffix -XX, where XX is the code of the language: 2. Copy the post you want to translate adding the suffix -XX, where XX is the code of the language, for example:
Line 50: Line 49:
    `$ cp new-developers-2015-08.md new-developers-2015-08-es.md`     `$ cp debian-is-25.md debian-is-25-es.md`
Line 52: Line 51:
Now you can edit it with a text editor. The posts are in markdown so a editor with syntax hilight would make it easier. Now you can edit it with a text editor. The posts are in markdown so a editor with syntax highlight would make it easier.
Line 69: Line 68:
Datehttps://titanpad.com/publicityl10n: leave it as is Date: leave it as is
Line 78: Line 77:
7. And now, finally, translate the Title line and the text of the post! Beware of the markdown syntax. You can read abouhttps://titanpad.com/publicityl10nt markdown at https://en.wikipedia.org/wiki/Markdown 7. And now, finally, translate the Title line and the text of the post! Beware of the markdown syntax. You can read about markdown at https://en.wikipedia.org/wiki/Markdown
Line 80: Line 79:
== Push your translation in git == == Send your translation for review/upload ==
Line 82: Line 81:
Once you have finished, commit the post and push it: You can send your translated file to the mailing list of your language team for others to review and upload. If you have no language team, or the review process is already done and you need the publicity team to upload the translation, you can send the file to the debian-publicity mailing list requesting an upload, or you can use git and Salsa to send a Merge Request or commit directly the file.

=== Push your translation in git ===

If you prefer to upload your translation yourself, using git, then commit the post and push it:
Line 85: Line 88:
    $ git add content/2015/yourpost-xx.md     $ git add content/2018/yourpost-xx.md
Line 90: Line 93:
Make sure you commit it in the branch of your language.

Now it's time to get somebody else reviewing your post! Once the post is reviewed, it can be pushed into the main branch and shown in http://bits.debian.org
If you were maintaining a fork in Salsa, the push will be sent to your local copy in Salsa; send a Merge Request to the Publicity team repository to get your translation into the original bits repo.

How to translate bits.debian.org into your language

The following instructions are work in progress. Translations are usually coordinated inside the L10n teams, please check with them first.

Get the English file you want to translate

The blog articles are written using ?MarkDown and these "source code" files are hosted in a git repository in Salsa, the Debian source code forge. You can use git and Salsa to work with translations, or you can just download the ?MarkDown file that you want to translate, translate it, and send it to your language team for review and upload, if you prefer to work without using Git or Salsa.

Get the file without using Git/Salsa

Get the markdown file of the article you want to translate from here: https://salsa.debian.org/publicity-team/bits/tree/master/content

(e.g. for the article about Debian 25 anniversary you can go to https://salsa.debian.org/publicity-team/bits/blob/master/content/2018/debian-is-25.md and then press the "Download" button).

Get the file using Git/Salsa

If you prefer to work with Salsa, Debian's Gitlab instance, but still don't have account, create a guest account: https://signup.salsa.debian.org/ (your account name will be something like USER-guest)

Then login and go to the Publicity group in Salsa: https://salsa.debian.org/publicity-team

You can fork the "bits" repository (create a local copy in your userspace in Salsa), and send Merge Requests with your contributions, or request to join the Publicity group to get commit permissions directly in the bits repo.

If you are Debian Developer, you already have commit access, no need to join the publicity group in Salsa.

If this is the first time you are working with git, you will need to install git in your machine.

1. In your local machine, clone the git repository. Open a terminal and type:

  • $ git clone git@salsa.debian.org:publicity-team/bits.git

or if you prefer to work with your fork and send merge requests via salsa, type:

  • $ git clone git@salsa.debian.org:your_username-guest/bits.git

If you already cloned the repo some time ago, just update your local copy with:

  • $ git pull

(or if you forked, the repo, see https://about.gitlab.com/2016/12/01/how-to-keep-your-fork-up-to-date-with-its-origin/ to configure your fork to be up-to-date with the Publicity team repository).

Prepare the post to translate

1. If you work inside a established translation group, they might have a process to reserve the file you want to translate; please follow it.

2. Copy the post you want to translate adding the suffix -XX, where XX is the code of the language, for example:

  • $ cp debian-is-25.md debian-is-25-es.md

Now you can edit it with a text editor. The posts are in markdown so a editor with syntax highlight would make it easier.

3. Below the Tags line add the following line: Lang: es

where "es" should be the code for your language, "es" is the code for Spanish. Check the code for your language in this page https://www.debian.org/international/l10n/po/

4. Add your name in an Translator line below the Author line:

Translator: Juana Smith

5. Change the Status line from "published" to "draft".

6. Check the header is something like this:

Title: translated title
Date: leave it as is
Tags: leave it as is
Slug: leave it as is
Author: translate the "and" (if several authors)
Translator: add name+surname, or nick
Lang: xx  (where xx is the language code, e.g. es for Spanish, tr for Turkish)
Status: draft

7. And now, finally, translate the Title line and the text of the post! Beware of the markdown syntax. You can read about markdown at https://en.wikipedia.org/wiki/Markdown

Send your translation for review/upload

You can send your translated file to the mailing list of your language team for others to review and upload. If you have no language team, or the review process is already done and you need the publicity team to upload the translation, you can send the file to the debian-publicity mailing list requesting an upload, or you can use git and Salsa to send a Merge Request or commit directly the file.

Push your translation in git

If you prefer to upload your translation yourself, using git, then commit the post and push it:

    $ git add content/2018/yourpost-xx.md
    $ git commit -m "lang xx: initial translation post foo"
    $ git push 

If you were maintaining a fork in Salsa, the push will be sent to your local copy in Salsa; send a Merge Request to the Publicity team repository to get your translation into the original bits repo.