Skip to content

Localising the client

Bartłomiej Dach edited this page Nov 5, 2022 · 11 revisions

Overview

In the osu! client, two types of localisable strings can be distinguished. While some strings are unique and specific to the game client, others are shared with osu-web, also known as the osu! website - particularly when it comes to online overlays, which are supposed to mirror the website content.

Due to this, the flow of propagating new translations is fairly complex, and the correct place to apply a change varies depending on where the string comes from and what language needs to be changed.

Use the following table to determine the correct place to apply your change.

I want to modify an English string I want to modify a string in another language
The string is only used in the client Edit the string in ppy/osu/osu.Game/Localisation Edit the string in the crowdin osu-web project
The string is shared with osu-web Edit the string in ppy/osu-web/resources/lang/en Edit the string in the crowdin osu-web project

Technical details of the process

The full flow of translation generation is depicted by the diagram below:

graph TD

client_english[LocalisableString added to<br>ppy/osu/osu.Game.Localisation] -- Exported via ppy/osu-localisation-analyser<br>see: LocalisationAnalyser.Tools to-resx --> client_string_resx_en[New English string resource added to<br>ppy/osu-resources/osu.Game.Resources/Localisation]
client_string_resx_en -- .resx files imported into crowdin --> crowdin_en[New localisable string added to<br>https://crowdin.com/project/osu-web]
crowdin_en --> crowdin_all[Non-English string localisations<br>contributed on Crowdin by users]
crowdin_all -- client strings: .resx files exported from crowdin<br><br>web strings: .php files exported from crowdin<br>and converted via ppy/osu-localisation-analyser to .resx<br>see: LocalisationAnalyser.Tools from-php --> resources_resx_all[All string localisations imported into<br>ppy/osu-resources]
resources_resx_all --> client_consumes[All string localisations consumed by ppy/osu]
web_english[New string resource added to<br>ppy/osu-web/resources/lang/en] -- .php files imported into crowdin --> crowdin_en
Loading

The pieces involved in this process are:

  • ppy/osu - the original source of English client-specific strings, and the final consumer of all localisations stored in osu-resources
  • ppy/osu-web - the original source of English strings shared with web
  • ppy/osu-localisation-analyser - hosts LocalisationAnalyser.Tools, which is used in this process twofold:
    • to export English strings from client to .resx files to be uploaded to crowdin for translation,
    • and to transform .php files with web string translations exported from crowdin to .resx files
  • the osu-web crowdin project, which is where users contribute non-English string translations for both client and web
  • ppy/osu-resources, which hosts all .resx files to be finally consumed by the game client

Understanding this process should explain some idiosyncrasies that you may encounter when working on localisations, such as:

  • Q: Why can't I find a string anywhere in the client source?
    • A: If the string isn't English, or is shared with web, then it will not appear in game source. Search crowdin or osu-resources instead.
  • Q: I edited one of the .cs files with English strings in ppy/osu/osu.Game/Localisation and nothing happened. What gives?
    • A: Strings already present in osu-resources trump the ones in osu. The strings provided to LocalisableString instances are only fallback values. For the change to take place, a maintainer will need to update the translations in osu-resources after it is changed in osu.