Skip to content

Commit

Permalink
Merge pull request #28 from r-devel/simple-numbering
Browse files Browse the repository at this point in the history
Switch to generic numbering in ordered markdown lists
  • Loading branch information
MichaelChirico authored Mar 18, 2024
2 parents 2fceb33 + b93a111 commit 346b7f2
Show file tree
Hide file tree
Showing 7 changed files with 61 additions and 59 deletions.
10 changes: 5 additions & 5 deletions web/Conventions_for_Languages/Arabic-specific-translations.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -95,12 +95,12 @@ improve the quality of your translations.
# How to Contribute:

1. Join [R Contributors](https://app.slack.com/client/T01DW9DLB2A/C01EST8PTFA) Slack group.
2. Join [#core-translation](https://app.slack.com/client/T01DW9DLB2A/C0210D7EN1X) channel.
3. Create an account on [Weblate](https://translate.rx.studio/) (currently maintained by
1. Join [#core-translation](https://app.slack.com/client/T01DW9DLB2A/C0210D7EN1X) channel.
1. Create an account on [Weblate](https://translate.rx.studio/) (currently maintained by
[@daroczig](https://twitter.com/daroczig));
4. Choose Arabic language to see all components.
5. Add your translation to a component that's not 100% translated.
6. Review translated components.
1. Choose Arabic language to see all components.
1. Add your translation to a component that's not 100% translated.
1. Review translated components.

## Glossary #### Note: The Arabic translation here is based on Google translate! It requires some review and edit. This
can be done later!
Expand Down
18 changes: 9 additions & 9 deletions web/Conventions_for_Languages/Catalan-specific-translations.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@ To help in the translation process, you need to:

1. Sign up to the [R Contributors Slack](https://contributor.r-project.org/slack) and introduce yourself in the
`#core-translations` channel;
2. Join [#core-translation-ca](https://app.slack.com/client/T01DW9DLB2A/C061B671J8G) channel.
3. Read the [Resources](#resources) section of this document, because the translation has some conventions that should
1. Join [#core-translation-ca](https://app.slack.com/client/T01DW9DLB2A/C061B671J8G) channel.
1. Read the [Resources](#resources) section of this document, because the translation has some conventions that should
be followed;
4. Create an account on [Weblate](https://translate.rx.studio/) (currently maintained by
1. Create an account on [Weblate](https://translate.rx.studio/) (currently maintained by
[@daroczig](https://twitter.com/daroczig));
5. List every Catalan [component](https://translate.rx.studio/languages/ca/r-project/);
6. Choose a component that's not 100% translated;
7. Click **Unfinished strings** to list all messages that haven't been translated and
8. Start!
1. List every Catalan [component](https://translate.rx.studio/languages/ca/r-project/);
1. Choose a component that's not 100% translated;
1. Click **Unfinished strings** to list all messages that haven't been translated and
1. Start!

## Resources

Expand Down Expand Up @@ -66,10 +66,10 @@ Alternatively, you can:
git clone https://$USER:$PRIVATE_TOKEN@translate.rx.studio/git/r-project/base-r-gui/
```

2. Look for the files at `src/library/*/po/*ca.po` and use any app to help you to review and fix the translations (eg.
1. Look for the files at `src/library/*/po/*ca.po` and use any app to help you to review and fix the translations (eg.
[Poedit](https://poedit.net/) or [Lokalize](https://apps.kde.org/ca/lokalize/))

3. You can not push to this repository. To upload the finished files, use the Weblate web interface (see image above).
1. You can not push to this repository. To upload the finished files, use the Weblate web interface (see image above).

### R-project specific conventions

Expand Down
12 changes: 6 additions & 6 deletions web/Conventions_for_Languages/Chinese-specific-translations.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,12 @@ _这里包含R语言翻译过程中的基本用语风格指南,您必须遵守
## 基本用语

1. 对翻译中的“你(you)”代称应使用敬语“您”,示例:您应该检查变量类型;
2. 基本统计术语应当参考当前主流应用词汇;
3. `%s`,`%i`,`%1$s`等被称作占位符,这里的文字会按照运行时生成的内容自动替换,您不能去掉或增加任何占位符,仅调整语序;
4. 对于上述3中的占位符,您可根据需要调整其语序。例如:`%s in %s must be a numerical` 可被翻译为 `%2$s 中的 %1$s 必须是数值型`。显然您可以看到这里每个`%s`的含义不一样,如果您需要调整第二个`%s`的语序,您可以添加它们的位置像`1$`这样的参数到其中。如果您不确定如何使用它,可以参考其他已被翻译的内容;
5. 禁止词汇:查阅 Weblate 的术语册一栏,会出现建议翻译/禁止翻译为XXX的提示,例如禁止将'robust' 翻译为“鲁棒”,而应当翻译为稳健性;
1. 基本统计术语应当参考当前主流应用词汇;
1. `%s`,`%i`,`%1$s`等被称作占位符,这里的文字会按照运行时生成的内容自动替换,您不能去掉或增加任何占位符,仅调整语序;
1. 对于上述3中的占位符,您可根据需要调整其语序。例如:`%s in %s must be a numerical` 可被翻译为 `%2$s 中的 %1$s 必须是数值型`。显然您可以看到这里每个`%s`的含义不一样,如果您需要调整第二个`%s`的语序,您可以添加它们的位置像`1$`这样的参数到其中。如果您不确定如何使用它,可以参考其他已被翻译的内容;
1. 禁止词汇:查阅 Weblate 的术语册一栏,会出现建议翻译/禁止翻译为XXX的提示,例如禁止将'robust' 翻译为“鲁棒”,而应当翻译为稳健性;

## 排版指南
1. 中英文(含数字)混合排版时,应当在英文字符前后保持一个空格,像这样`欢迎使用 R 语言`
2. 无须翻译的内容:一些内置函数、参数、值不能被翻译。例如`WARNING: no value given for '--max-connections'` 其中 `'--max-connections'` 这样的我们可以判断为参数,则保持不变。因此我们翻译成`警告:'--max-connections' 没有给定值`
3. 保持术语一致性:我们应当尽可能保持程序和统计术语在上下文的一致性,并保证其与一些教材、论文当常用术语的继承性。
1. 无须翻译的内容:一些内置函数、参数、值不能被翻译。例如`WARNING: no value given for '--max-connections'` 其中 `'--max-connections'` 这样的我们可以判断为参数,则保持不变。因此我们翻译成`警告:'--max-connections' 没有给定值`
1. 保持术语一致性:我们应当尽可能保持程序和统计术语在上下文的一致性,并保证其与一些教材、论文当常用术语的继承性。
26 changes: 13 additions & 13 deletions web/Conventions_for_Languages/Nepali-specific-translations.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -43,66 +43,66 @@ accuracy and linguistic clarity of the translated text. Here's a translation gui
Before translating any message or warning, it's crucial to understand the context. Know what the message is conveying,
what part of the code it relates to, and its intended audience.

2. Maintain Technical Accuracy:
1. Maintain Technical Accuracy:

Ensure that the translated message conveys the same technical information as the original. The goal is to make sure that
users can still understand the issue or information provided.

3. Preserve Clarity:
1. Preserve Clarity:

Clarity is paramount in translations. Make sure the translated message is clear and easy to understand. Avoid overly
complex or verbose translations.

4. Use Formal Nepali:
1. Use Formal Nepali:

When translating messages for a general audience or professional context. Avoid using dialects unless the message is for
a specific region where a particular dialect is preferred.

5. Consistency:
1. Consistency:

Maintain consistency in your translations. Use consistent terminology and wording throughout the translation to avoid
confusion.

6. Be Mindful of Length:
1. Be Mindful of Length:

Consider that the Nepali translation might be longer or shorter than the English text. Ensure that the translated
message fits within the space allocated in the code or interface.

7. Retain Technical Terms:
1. Retain Technical Terms:

For technical terms and code-related elements such as function names, object names, and variable names, it's often best
to keep them in English. Use the Nepali script for these terms if necessary but maintain the English terminology.

8. Handle Plurals:
1. Handle Plurals:

Nepali nouns have different forms for singular and plural. Ensure that you correctly handle plurals when translating
messages that involve counts or quantities.

9. Punctuation:
1. Punctuation:

Use punctuation stop (|) and ensure proper spacing around punctuation marks.

10. Special Characters:
1. Special Characters:

Some technical messages may contain special characters like `%s, %d, or %f` for string, integer, and floating-point
substitutions. Keep these special characters and their order in the translated message, making sure they correspond
correctly with the placeholders.

11. Test the Translation:
1. Test the Translation:

After translating, test the messages in the R environment to ensure they appear correctly and are still functional.

12. Document Translations:
1. Document Translations:

Keep a record of your translations for reference. This documentation can help maintain consistency in future
translations and facilitate collaboration with other translators.

13. Seek Feedback:
1. Seek Feedback:

If possible, seek feedback from native Nepali speakers who are also familiar with programming to ensure the translations
make sense in the intended context.

14. Revise and Update:
1. Revise and Update:

Programming languages evolve, and so should your translations. Periodically review and update your translations to align
with changes in the R programming language or best practices in translation.
Expand Down
14 changes: 8 additions & 6 deletions web/Weblate-FAQ.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,16 @@ see e.g. at <https://translate.rx.studio/projects/r-project/base-c/>
Only Weblate admins can do that. For now, please reach out to @daroczig or @MichaelChirico.

1. Go the the [R Project project dashboard](https://translate.rx.studio/projects/r-project/)
2. Click on the "Add new translation component" button at the bottom of the page 3. Provide a name for the component
1. Click on the "Add new translation component" button at the bottom of the page
1. Provide a name for the component
following the naming schema of the other components (package name optionally followed by R or C files between parens,
e.g. `methods (R files)`). It is required to split a package into (at least) two components when there are multiple PO
files around, e.g. for R and C files, sometime even a 3rd one for the GUI
4. Source code repo should point to `weblate://r-project/base-r-gui` (this is set to auto-poll the SVN repo)
5. File format is usually `gettext PO file` (for strings extracted from R core and recommended packages), or e.g. iOS
strings (for Mac GUI) 6. Provide file mask, e.g. `src/library/base/po/*.po` or `src/library/compiler/po/R-*.po`
7. Set a Language filter when needed to guide Weblate which files to pick up (e.g. to exclude the PO files starting with
1. Source code repo should point to `weblate://r-project/base-r-gui` (this is set to auto-poll the SVN repo)
1. File format is usually `gettext PO file` (for strings extracted from R core and recommended packages), or e.g. iOS
strings (for Mac GUI)
1. Provide file mask, e.g. `src/library/base/po/*.po` or `src/library/compiler/po/R-*.po`
1. Set a Language filter when needed to guide Weblate which files to pick up (e.g. to exclude the PO files starting with
`R` (part of the "R files" component) for the "C files" component, something like `^(?!en$)[a-z][^.]+$`

### How to add a new package?
Expand All @@ -55,7 +57,7 @@ installation of Weblate to crowdsource the translation of your already extracted
in short, the following steps are expected:

1. The Weblate admins create a [new component](#how-to-add-a-new-component) using your git/SVN repo
2. Optionally set up push-back hooks to the `master` or other branch, so that new translations are available in the
1. Optionally set up push-back hooks to the `master` or other branch, so that new translations are available in the
original repo as well

### How to test the changes I made in Weblate?
Expand Down
32 changes: 16 additions & 16 deletions web/Weblate-server.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -134,23 +134,23 @@ _NB: Weblate links below assume you're logged in there, otherwise you'll be redi
### To generate a report on the translation updates in a time period:

1. Visit <https://translate.rx.studio/projects/r-project/#reports>
2. Select time period and generate report in rST format
3. Convert ~markdown to HTML and share in the R Contributors slack group's #core-translation channel
1. Select time period and generate report in rST format
1. Convert ~markdown to HTML and share in the R Contributors slack group's #core-translation channel

### To submit a patch file on the translations found in Weblate but not in the trunk of the main R subversion repo:

The basic idea is to compare the Weblate repo (which copies the R subversion repo, but also adds translations provided _via_ Weblate) to the "official" R sources; any difference in .po files should be submitted as a patch.

1. Make sure the Weblate repo is fully up-to-date. Check status at https://translate.rx.studio/projects/r-project/#repository -- be sure there are no `Update` or `Commit` actions needed.
2. Get the two repos cloned on any machine:
1. Get the two repos cloned on any machine:

```sh
git clone -o weblate https://translate.rx.studio/git/r-project/base-r-gui/ # remote #1: Weblate source
git remote add svn git remote add svn [email protected]:r-devel/r-svn.git # remote #2: SVN source
git fetch svn master # retrieve the latest from SVN
```

3. Revert unwanted changes to reduce noise, e.g. something like:
1. Revert unwanted changes to reduce noise, e.g. something like:

```r
library(data.table)
Expand Down Expand Up @@ -203,14 +203,14 @@ The basic idea is to compare the Weblate repo (which copies the R subversion rep
system2("sed", c("-i", "'s/[email protected]/bugs.r-project.org/'", po_summary$filename))
```

4. Generate a patch file from the diff, going back to the most recent commit with translations merged, e.g.
1. Generate a patch file from the diff, going back to the most recent commit with translations merged, e.g.

```sh
# NB: _not_ 'git diff weblate/master svn/master' since we've just deleted the empty .po files locally
git diff svn/master --no-prefix -- "*.po"
```

8. Share the patch file on the R Contributors Slack group's #core-translation channel and kindly ping @MichaelLawrence for his assistance on getting the patch file applied on the trunk of R dev to get it merged. We should do this ~once per quarter.
1. Share the patch file on the R Contributors Slack group's #core-translation channel and kindly ping @MichaelLawrence for his assistance on getting the patch file applied on the trunk of R dev to get it merged. We should do this ~once per quarter.

## Maintenance

Expand Down Expand Up @@ -241,20 +241,20 @@ rebase refs/remotes/origin/trunk: command returned error: 1
Weblate will provide a suggestion on how to fix, but in short:

1. SSH to the Weblate server
2. Make a backup on the Git repo before messing with the rebase process:
1. Make a backup on the Git repo before messing with the rebase process:

```sh
tar -zcvf /root/base-r-gui-repo-$(date '+%Y-%m-%d').tar.gz \
/var/lib/docker/volumes/weblate-docker_weblate-data/_data/vcs/r-project/base-r-gui
```

3. Attach the Docker container (this image is offered by `weblate`):
1. Attach the Docker container (this image is offered by `weblate`):

```sh
sudo docker exec -ti weblate-docker_weblate_1 bash
```

4. Enter the git folder:
1. Enter the git folder:

```sh
cd app/data/vcs/r-project/base-r-gui
Expand All @@ -266,14 +266,14 @@ Weblate will provide a suggestion on how to fix, but in short:
/var/lib/docker/volumes/weblate-docker_weblate-data/_data/vcs/r-project/base-r-gui
```

5. Pull from SVN and start the rebase process to see the actual errors:
1. Pull from SVN and start the rebase process to see the actual errors:

```sh
git svn fetch
git svn rebase
```

6. Optionally, if not yet done, install [helpers](https://github.com/JulienPalard/po3way) to make it easier to deal with the git conflicts (inside Docker). Start Docker as root to install `po3way` system-wide:
1. Optionally, if not yet done, install [helpers](https://github.com/JulienPalard/po3way) to make it easier to deal with the git conflicts (inside Docker). Start Docker as root to install `po3way` system-wide:

```sh
$ sudo docker exec -u root -ti weblate-docker_weblate_1 bash
Expand Down Expand Up @@ -307,7 +307,7 @@ Weblate will provide a suggestion on how to fix, but in short:
*.pot merge=po3way
```

7. Resolve the conflict via a text editor, then continue. Let's say `src/library/base/po/es.po` is affected:
1. Resolve the conflict via a text editor, then continue. Let's say `src/library/base/po/es.po` is affected:

```sh
mcedit src/library/base/po/es.po
Expand Down Expand Up @@ -339,14 +339,14 @@ In case of any questions, reach out to them on the R-devel Slack's `#core-transl
To add a new admin in the Weblate app:

1. Go to the [Users page](https://translate.rx.studio/manage/users)
2. Select the user
3. Go to "Groups"
4. Add to the "The R Project for Statistical Computing / Administration" group
1. Select the user
1. Go to "Groups"
1. Add to the "The R Project for Statistical Computing / Administration" group

To grant SSH access:

1. Share your public key with one of the admins, who will add that to `~/.ssh/authorized_keys`
2. Ask for the SSH config from one of the admins
1. Ask for the SSH config from one of the admins

### Team leaders

Expand Down
8 changes: 4 additions & 4 deletions web/index.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ So if you want to start, you can contribute by following these steps:
1. Sign up to the [R Contributors Slack](https://contributor.r-project.org/slack) and introduce yourself in the
#core-translations channel;

2. Create an account on [Weblate](https://translate.rx.studio/) (currently maintained by
1. Create an account on [Weblate](https://translate.rx.studio/) (currently maintained by
[@daroczig](https://twitter.com/daroczig)) and read the Translations chapter on the [R Development
guide](https://contributor.r-project.org/rdevguide/);

3. Read the [Conventions for translation](Conventions_for_Languages/index.qmd)
1. Read the [Conventions for translation](Conventions_for_Languages/index.qmd)
section of this Wiki, for some conventions that should be followed;

4. Read the guidelines for the specific language you want to contribute to. If a guideline for your language doesn't
1. Read the guidelines for the specific language you want to contribute to. If a guideline for your language doesn't
exist yet, please feel free to submit a pull request and create it.

|Language |
Expand All @@ -38,7 +38,7 @@ exist yet, please feel free to submit a pull request and create it.
|[Portuguese (Brazilian)](Conventions_for_Languages/Brazilian‐Portugese-specific-translations.qmd)|
|[Spanish](Conventions_for_Languages/Spanish-specific-translations.qmd)|

5. You can start translating!
1. You can start translating!

You can check the
[guide](https://contributor.r-project.org/rdevguide/message-translations.html#how-to-contribute-new-translations) on how
Expand Down

0 comments on commit 346b7f2

Please sign in to comment.