• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

dekdevy/hordes-loc: Community driven Hordes.io string localization

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

dekdevy/hordes-loc

开源软件地址(OpenSource Url):

https://github.com/dekdevy/hordes-loc

开源编程语言(OpenSource Language):

JavaScript 100.0%

开源软件介绍(OpenSource Introduction):

hordes-loc

Community driven text and localization repository for the browser game Hordes.io. This is a library of strings for all in-game text, user interface labels, game lore, item descriptions, etc.

This repository is a public submodule of the hordes.io sourcecode, containing a build script to compile files found in loc/ into individual language specific .json files (here are the Russian and German files for an example). Translations for any respective language do not have to be complete, as the build script will substitute the original English text for any strings that have not been translated for the language.

Resources for first timers and GitHub beginners

Contributing

For your first translations, please fork the repository and start editing files that way. If everything looks good, your edits will be merged into the main repository.

Make sure to read all the comments in the files and take them seriously. Do not translate placeholder texts. Do not translate unique names. If you are unsure, cross-check with other translations to see whether a word is translated or not. For example, words like party, clan or unique names like Yggdrasil will generally not be translated to make sure players can communicate effectively regarding fundamental concepts of the game. Any text which has a $$ tag before it is also not to be translated. Please make sure to add thorough and informative descriptions of your changes in the PR (Pull Request) and commit descriptions, otherwise we will likely ignore or close your PR.

New languages and translations are always welcome, so feel free to make a PR. Any language types are welcome. In order to contribute translations, simply add them to the respective files in the loc/ directory. Make sure to check the build results (Github Action) after you make a Pull Request to correct any errors that may arise. Join our Discord if you need help.

If you want to check the status of any translation, go to this link and select the "run npm test" result which informs us about translation status of all the languages.

Detecting loc types...
  Found 23 languages
Compiling...
  en → 534/534 100%
  fr → 460/534  86%
  ru → 459/534  85%
  it → 408/534  76%
  de → 405/534  75%
  ...
Exporting...
  en -> en.json
  de -> de.json
  ru -> ru.json
  ...

If you want to check which languages are missing in a file, navigate to the file name in this link, which informs us about missing languages in a file.

Finding missing translations...
   classes archer description → [de, tr, es]

Examples

Lets say we want to add a German translation to some of the strings for the Archer class. We navigate to loc/classes/archer.js, and find:

export default {
  // The class name
  name: {
    en: 'Archer',
    ru: 'Лучник'
  },
  // Class description, visible during character creation
  description: {
    en: 'Archers deal high single target damage and bursty...',
    ru: 'Лучники наносят высокий урон по одиночной цели и...'
  }
}

All strings are contained in objects that hold translations for any amount of languages. The default language will generally be enfor English, but any language can be added. In this case, we can see the Archers name being held in the name: { ... } object, and the Russian translation is already present, along with the original English text.

To add a translation, simply add a language code (en, de, fr...) with your translation. For example, to add a German translation for the Archer's name:

  // The class name
  name: {
    en: 'Archer',
    ru: 'Лучник',
    de: 'Jäger'
  }

We do not have to add a German translation for the description string (You can if you want to, of course). It is perfectly fine if the translations are incomplete, as the build system will automatically resolve the incomplete translations to English. Once you finished your translation, scroll down to the bottom of the page to find a button named Commit changes. Leave the option below as Commit directly to the master branch and click the button. Now that you're done comitting the translation, go to your fork's main page and click the button New pull request, add in a name for your Pull Request and click Create Pull Request. If everything went fine, your translations will be available in the game.




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap