Skip to content

Kata Translations

Brad Wood edited this page Jan 30, 2020 · 13 revisions

Kata authors must write test cases for each specific language that they want to support, as well as a working solution to prove the kata can be solved. As you can imagine, it's not practical for a kata author to be able to write the challenge in all 20+ languages that Codewars supports.

This is where translations come in. They allow other warriors to translate the language into a new one. They then publish the translation, where the author, an admin, or a power user with the Co-Author privilege can then approve the changes. Once a translation is approved, it will be added to the kata.

How to Find Them

Once you have completed a kata, there will be a new choice within the languages menu to add a new language.

This will take you to the translations page where you can view existing translations and create new ones.

Honor & Rank

Translations are worth twice the honor you would normally receive for completing the kata. You will also receive an additional +2 honor for publishing the translation in the first place, regardless of approval.

Once approved you will also receive the rank progression associated with the kata. If the kata is in beta, you will receive the rank progression once it gets approved and its rank assigned.

Forks

Code Warriors can fork a translation to improve it and help it get approved faster. However they will not receive rank or honor progression, only the original translator will.

Merge Issues

Often times if two translations are created around the same time, they will both update the description. When approving the 2nd translation, the 1st approved translation will have already updated the description. This will cause a merge conflict which will need to be resolved. You can do this by forking the 2nd translation and updating the description. <<<<<<<<, ========= and >>>>>>>> merge labels will show up in the description to help identify where the merge issues are.

Once you have fixed the description merge issues you can publish the translation. If you are not the author then you will need to have someone else verify your changes and approve the translation.

Remarks on translating

Avoid creativity

A translation is essentially just a "port" of the original kata to a new language. Every aspect of the original kata should be retained.

The original kata sensei has probably invested a lot of time to make the kata in the first place.

Homogeneity across all languages is key to a good kata, and a kata "satisfaction rating" can easily be impacted by the quality of a translation, so it is the responsibility of the translator to maintain every intent of the original kata sensei.

Specifically

  • do not change the kata description unless absolutely necessary
  • do not change the original kata input / output / logging
  • do not change any test cases, or refactor any them to be grouped differently
  • do not add your own 'cute' comments in the code
  • do not make any of your own "improvements" without informing the kata sensei why they were required

If this advice seems too restrictive then you should avoid translating, and instead consider writing your own kata where you can be as creative as you want to be.

Consider relevance

Not all kata can be translated to all languages.

For example, if the kata is of a "Bugfix" type, the problem may not be applicable to other languages. If it feels like you are jamming a square peg into a round hole to create the translation then do not do it.

Language conventions

The translation must use the naming, language and syntax conventions of the language it is translated to.

Shared Descriptions

Please note, the description for a kata is shared for all translations. Do not remove or add anything specific to your language. The exception to this is if the description uses sequenced code blocks (which is at the discretion of the kata author). In that case, add a new code block using the formatter for your language and it will be the code block chosen to display when warriors take this kata using your language translation.

How to announce your translation

When you publish your translation the original kata sensei will be automatically notified that your effort is pending his/her approval. But it is also good practice to write a comment in the kata "Discourse" to announce what you have done.

Tip: marking that comment as a suggestion will also help your translation from being accidentally overlooked.

Remarks on accepting a translation

Before you accept a translation, make sure that the difficulty and quality of the translation matches the current languages. In doubt, write a comment on the translation. If the translation diverges from the original kata, ask the translator politely whether (s)he can modify the translation so that it matches your intent.

If you want to comment on the translation, you can do that on the "Discourse" page, just as in normal katas or kumites. This is especially helpful if you're not sure whether the translation really reflects your original intentions.

Clone this wiki locally