Difference between revisions of "Setup of a new project"

From translatewiki.net
Jump to navigation Jump to search
(43 intermediate revisions by 6 users not shown)
Line 1: Line 1:
{{draft}}
 
 
 
== Verify the project ==
 
== Verify the project ==
  +
Requirements and process: [[Translating:New project]] for details. Best practices we usually enforce (main pain point): [[Translating:Localisation for developers]].
  +
* Content fit
  +
** Software interface messages
  +
** Some prose is okay, such as terms of service. But they should be split into smaller parts. In some cases it can be done using translatable wiki pages here in translatewiki.net
  +
** For large amounts of prose, it is recommend to set up Translate extension for MediaWiki yourself
  +
** The software being translated has utility to general public. No personal websites or tools useful only to the author.
 
* License
 
* License
  +
** Should be a known open source license
 
* Quality of strings
 
* Quality of strings
  +
** Should avoid spelling mistakes, bad grammar
  +
** No lego messages (constructing messages with string concatenation)
  +
** Consistency with punctuation, letter casing and terminology
  +
** Minimal mark-up inside the strings.
 
* Message documentation
 
* Message documentation
  +
** Applicable parts of [[Translating:Localisation for developers#Message_documentation]]
 
* Activity and interest (releases, contact person)
 
* Activity and interest (releases, contact person)
  +
** Frequent deployment or frequent releases. Having to wait over a year without release or deployment is not acceptable.
* File format
 
  +
* [[mw:Special:MyLanguage/Help:Extension:Translate/File_format_support|File format is supported]]
* Push access
 
  +
  +
== Access for delivering translation updates ==
  +
* BitBucket: Give push access to [https://bitbucket.org/translatewiki/ translatewiki]
  +
* GitHub: Give push access to [https://github.com/translatewiki @translatewiki] (Create and merge commits; pull requests are not yet supported)
  +
* GitLab: Give push access to [https://gitlab.com/translatewiki translatewiki]
  +
* SourceForge: Make [https://sourceforge.net/u/translatewiki/profile/ translatewiki] a developer
  +
* Wikimedia Gerrit: See [[mw:Gerrit/L10n-bot]]
  +
* Wikimedia Phabricator: Give push access to L10n-bot
  +
* Other: Discuss with translatewiki.net staff (Nikerabbit or Siebrand)
   
 
== Repository configuration ==
 
== Repository configuration ==
Edit repoconfig.json and repoconfig.commit.json, bin/EXTERNAL-PROJECTS bin/REPONG-PROJECTS in the translatewiki repository.
 
   
  +
Edit <code>repoconfig.yaml</code> in the [https://gerrit.wikimedia.org/r/#/admin/projects/translatewiki translatewiki repository]. See [[phab:rGTWN810e767d2d65468120a59162eca708202c73eb18|an example of the needed patch]].
Also update-externals.sh for myself, not currently in version control.
 
   
  +
Tips:
GitHub read-only mirror link: https://github.com/wikimedia/translatewiki/
 
  +
* Keep alphabetical order of projects and groups in <code>repoconfig.yaml</code>
  +
* Place repositories under a subdirectory named after the project if multiple repositories might be added for the project
  +
** It is recommended to mirror the <code>organization/repo-name</code> pattern (as used in GitHub, for example) as the directory structure
   
  +
Resources:
Ensure push-access is given either to L10n-bot (wikimedia gerrit) or Niklas and Siebrand (GitHub or BitBucket)
 
  +
* Read-only mirror link for configuration for currently enabled projects: https://phabricator.wikimedia.org/diffusion/GTWN/browse/master/repoconfig.yaml
 
Some documentation exists at [[Repository management]], but it is mostly outdated by the new repong framework, where most projects have already been converted to.
+
* [[Repository management]] explains some of the internal commands how repositories are managed. Only translatewiki.net staff deals with them.
   
 
== Message group configuration ==
 
== Message group configuration ==
Lots of examples under groups/ in translatewiki repo.
+
Lots of examples under groups/ in translatewiki repo. Here's an [https://phabricator.wikimedia.org/rGTWN810e767d2d65468120a59162eca708202c73eb18 example commit].
 
Old but mostly still valid documentation: https://www.mediawiki.org/wiki/Help:Extension:Translate/Group_configuration_example
 
Old but mostly still valid documentation: https://www.mediawiki.org/wiki/Help:Extension:Translate/Group_configuration_example
   
Need some info such as logo and message group description done in the next section.
+
Some fields such as the logo filename and message group description depend on steps documented in the ''Wiki configuration'' section.
   
 
Choosing a group id:
 
Choosing a group id:
* Practice is to use lowercase letter with dashes as level separators in case of multiple groups
+
* Practice is to use lowercase letters with dashes as level separators in case of multiple groups.
* Prefix "out-" is deprecated and should not be used for new projects
+
* Prefix "out-" is deprecated and should not be used for new projects.
* In case of multiple groups, suffixes like "-0-all" are deprecated. Aggregate group should get the top level name, i.e. "blockly" and it should take all groups names "blockly-*"
+
* In case of multiple groups, the aggregate group should get the top level name, i.e. "blockly", and contain all groups named "blockly-*". Suffixes like "-0-all" are deprecated.
  +
* Do not use comma or asterisk or question mark! These have special meaning in places which accept group patterns.
  +
* Also avoid characters which are [[mw:Manual:Page title#Invalid page titles|invalid in MediaWiki titles]], as that breaks shortcuts such as Special:MessageGroupStats/foo (which may be used by the people, but not generated by Translate itself).
  +
  +
All message keys should be prefixed with mangler if it is likely that multiple message groups will exist at some point (remember that one file + its translations is one group).
  +
  +
Update <code>TranslateSettings.php</code> to register the yaml file, possibly add a new namespace (if none of the existing ones fit).
  +
  +
To apply the changes to translatewiki.net, do the following:
  +
<pre>
  +
twn-update-config
  +
sudo /usr/sbin/service mw-jobrunner restart # This is important if new namespace is added!
  +
autoimport
  +
</pre>
   
 
== Wiki configuration ==
 
== Wiki configuration ==
   
  +
Translating:projectname needs to be created (copy template from [[Translating:FreeCol]] or other).
TranslateSettings.php needs updated to register the yaml file, possibly new namespace as well if none of the existing ones fit.
 
   
  +
A logo is highly recommended but not mandatory. Logo needs to be in Wikimedia Commons or uploaded to translatewiki.net. Vector format (SVG) is recommended to enable non-blurry display in the interface. As a fallback, high resolution raster image can be used. MediaWiki will automatically create thumbnails.
Translating:projectname needs to be created (copy template from Translating:FreeCol) for example.
 
Logo needs to be in Commons or uploaded to translatewiki.net
 
   
  +
Add descriptions to [[Group descriptions]] and mark the page for translation (only [[Special:ListUsers/transadmin|translation admins]] can mark, ping one if it does not happen automatically in a short while). It is also okay (even preferable) to use a message key from the project's i18n files, if such exists.
Description needs to be added to https://translatewiki.net/wiki/Group_descriptions and page marked for translation.
 
   
 
Other misc things:
 
Other misc things:
* Add babel templates (this very often is forgotten to do - the whole thing should be automatized)
+
* Add babel templates (this is forgotten very often - the whole thing should be automatized)
* Add support to Template:Support and relevant categories
+
* Add [[:Category:Support requests|support categories]] and [[template:Support/mapping|an alias if needed]]
  +
  +
Once things are stable, feel free to announce the new project in [[MediaWiki:Sitenotice]] and [[Project:News]].
  +
  +
== See also ==
   
  +
* [[Translating:New project]]
  +
* [[Translating:Localisation for developers]]
   
 
[[Category:Help]]
 
[[Category:Help]]
  +
[[Category:Management]]

Revision as of 19:41, 23 October 2019

Verify the project

Requirements and process: Translating:New project for details. Best practices we usually enforce (main pain point): Translating:Localisation for developers.

  • Content fit
    • Software interface messages
    • Some prose is okay, such as terms of service. But they should be split into smaller parts. In some cases it can be done using translatable wiki pages here in translatewiki.net
    • For large amounts of prose, it is recommend to set up Translate extension for MediaWiki yourself
    • The software being translated has utility to general public. No personal websites or tools useful only to the author.
  • License
    • Should be a known open source license
  • Quality of strings
    • Should avoid spelling mistakes, bad grammar
    • No lego messages (constructing messages with string concatenation)
    • Consistency with punctuation, letter casing and terminology
    • Minimal mark-up inside the strings.
  • Message documentation
  • Activity and interest (releases, contact person)
    • Frequent deployment or frequent releases. Having to wait over a year without release or deployment is not acceptable.
  • File format is supported

Access for delivering translation updates

  • BitBucket: Give push access to translatewiki
  • GitHub: Give push access to @translatewiki (Create and merge commits; pull requests are not yet supported)
  • GitLab: Give push access to translatewiki
  • SourceForge: Make translatewiki a developer
  • Wikimedia Gerrit: See mw:Gerrit/L10n-bot
  • Wikimedia Phabricator: Give push access to L10n-bot
  • Other: Discuss with translatewiki.net staff (Nikerabbit or Siebrand)

Repository configuration

Edit repoconfig.yaml in the translatewiki repository. See an example of the needed patch.

Tips:

  • Keep alphabetical order of projects and groups in repoconfig.yaml
  • Place repositories under a subdirectory named after the project if multiple repositories might be added for the project
    • It is recommended to mirror the organization/repo-name pattern (as used in GitHub, for example) as the directory structure

Resources:

Message group configuration

Lots of examples under groups/ in translatewiki repo. Here's an example commit. Old but mostly still valid documentation: https://www.mediawiki.org/wiki/Help:Extension:Translate/Group_configuration_example

Some fields such as the logo filename and message group description depend on steps documented in the Wiki configuration section.

Choosing a group id:

  • Practice is to use lowercase letters with dashes as level separators in case of multiple groups.
  • Prefix "out-" is deprecated and should not be used for new projects.
  • In case of multiple groups, the aggregate group should get the top level name, i.e. "blockly", and contain all groups named "blockly-*". Suffixes like "-0-all" are deprecated.
  • Do not use comma or asterisk or question mark! These have special meaning in places which accept group patterns.
  • Also avoid characters which are invalid in MediaWiki titles, as that breaks shortcuts such as Special:MessageGroupStats/foo (which may be used by the people, but not generated by Translate itself).

All message keys should be prefixed with mangler if it is likely that multiple message groups will exist at some point (remember that one file + its translations is one group).

Update TranslateSettings.php to register the yaml file, possibly add a new namespace (if none of the existing ones fit).

To apply the changes to translatewiki.net, do the following:

twn-update-config
sudo /usr/sbin/service mw-jobrunner restart # This is important if new namespace is added!
autoimport

Wiki configuration

Translating:projectname needs to be created (copy template from Translating:FreeCol or other).

A logo is highly recommended but not mandatory. Logo needs to be in Wikimedia Commons or uploaded to translatewiki.net. Vector format (SVG) is recommended to enable non-blurry display in the interface. As a fallback, high resolution raster image can be used. MediaWiki will automatically create thumbnails.

Add descriptions to Group descriptions and mark the page for translation (only translation admins can mark, ping one if it does not happen automatically in a short while). It is also okay (even preferable) to use a message key from the project's i18n files, if such exists.

Other misc things:

Once things are stable, feel free to announce the new project in MediaWiki:Sitenotice and Project:News.

See also