borealis
borealis copied to clipboard
Core - Improvements to i18n
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)
I like how I replaced a fatty library with a even more fatty library
No, I downloaded the 2021.03.22.00 release, It should be a subrepo
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.
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.
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
.
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.