borealis icon indicating copy to clipboard operation
borealis copied to clipboard

Core - Improvements to i18n

Open EmmmaTech opened this issue 3 years ago • 6 comments

Implements #127 and #130, all in one Pull Request. This Pull Request aims to improves i18n and BRLS_ASSET.

Features implemented before this PR was made:

  • Switches from using JSON to XML for i18n
  • Removes the linter script (partly replaced with printing errors)
  • Move built-in brls strings to source code (like built-in views XML)
  • Add an opt-out feature to disable i18n (still loads internal translations)
  • Change BRLS_ASSET from a macro to an inline static function
  • Use std::filesystem::path to convert to a platform-specific directory separator
  • Add method to get locale for the GLFW Platform (tested on macOS Big Sur 11.0.1)

To-do with this Pull Request:

  • Nothing, for now

What's finished:

  • See "Features implemented before this PR was made"
  • [x] Write a Python script to convert an i18n JSON to i18n XML
  • [x] Fully re-implement linter script inside of the library
  • [x] Change how internal translations are loaded to what it was before (instead of loading to a separate unordered map, load to the current or default locale unordered map)

EmmmaTech avatar Mar 27 '21 03:03 EmmmaTech

I like how I replaced a fatty library with a even more fatty library

EmmmaTech avatar Mar 31 '21 21:03 EmmmaTech

No, I downloaded the 2021.03.22.00 release, It should be a subrepo

EmmmaTech avatar Apr 02 '21 14:04 EmmmaTech

Okay done. It's now a subrepo! Also, just so you can know, the Switch build still uses std::unordered_map. IIRC, I couldn't get it to build, so GLFW will be using F14FastMap for now.

EmmmaTech avatar Apr 02 '21 15:04 EmmmaTech

Couldn't get what to build? F14FastMap?

Le 2 avril 2021 17:12:58 EmreTech @.***> a écrit :

Okay done. It's now a subrepo! Also, just so you can know, the Switch build still uses std::unordered_map. IIRC, I couldn't get it to build, so GLFW will be using F14FastMap for now. — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

natinusala avatar Apr 02 '21 15:04 natinusala

Yeah. It freaks out after it can't find file folly-config.h. And even after providing that file, it still didn't work IIRC. Edit: it's because it can't find header __config.

EmmmaTech avatar Apr 02 '21 15:04 EmmmaTech

I decided to remove Folly because the library is too big and we're only using it for one purpose. Someone else can add it back later.

EmmmaTech avatar Nov 07 '21 01:11 EmmmaTech