ARCropolis icon indicating copy to clipboard operation
ARCropolis copied to clipboard

[Qualify of Life] Localization

Open Raytwo opened this issue 2 years ago • 0 comments

QoL suggestion

How could we make this better?

By checking either the user's configuration, load messages appropriate for the user's language when ARCropolis displays something. And to go with it, replace every error popup using code 69 by an actual code so people can help with debugging issues even if the screenshot isn't in a language they can read.

Is there an alternative way of doing things you'd like to suggest?

N/A

Additional information

  • Should be based on english messages and default to that if a language is not supported yet or a line is missing from that file.
  • Multiple approaches are possible, even going as far as making a msbt file for it (might as well reuse existing formats), but preferably something easier to edit and maintain such as a toml file maybe.
  • It is preferable that the files are built directly into ARCropolis using includes_bytes!. However, for the sake of simplicity for contributors who wish to help localizing in their own language, a file should be read from the SD if present and prevail over the include_bytes one.
  • A global usage such as the hashes.rs file written by @jam1garner is preferable.
  • Utility functions should be provided to fetch a line by identifier as well as providing variables for formatting (refer to next bullet point).
  • Lines should support the "format" system found in most languages. (Replacing variables such as %d by a number, in order of listing. An example of this can be found by looking at the usage of vsprintf)

Raytwo avatar Aug 19 '21 16:08 Raytwo