Giter Club home page Giter Club logo

osu-localisation-analyser's People

Contributors

frenzibyte avatar itsshamed avatar peppy avatar smoogipoo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

osu-localisation-analyser's Issues

Change prefix via a .editorconfig option

The prefix controls where the user needs to place the .resx files. For osu!, the class will be placed in osu.Game/Localisation/XStrings.cs, and the resources placed in osu.Game.Resources/Localisation/XStrings.cs.

Apostrophes not handled correctly

        /// <summary>
        /// "Couldn&#39;t fetch scores!"
        /// </summary>
        public static LocalisableString CouldnTFetchScores => new TranslatableString(getKey(@"couldn_t_fetch_scores"), @"Couldn't fetch scores!");

[Proposal] Category the the localization string class by folder.

Discussion in the karaoke-dev/karaoke#1265 (comment) with @smoogipoo
It will be better if localization string can be place into different folder in the Localisation

Here's the solution figured out by @smoogipoo:

MyProject
|- Localisation
   |- Chat
      |- ...                        => *Strings files  <-------------------|
   |- SomeOtherLargeNamespace                                              |
      |- ...                        => *Strings files <--------------------|------------------|
|- UI                                                                      |                  |
   |- Chat                                                                 |                  |
      |- .editorconfig              => Maps to Localisation/Chat namespace |                  |
      |- ...                                                                                  |
   |- SomeOtherLargeNamespace                                                                 |
      |- .editorconfig              => Maps to Localisation/SomeOtherLargeNamespace namespace |
      |- ...
|- Resources
   |- ...

`zh-TW` is an unsupported culture code

We're currently pulling culture codes from the osu-web directory listing.

zh-tw is one of them, and the only one which looks to be unsupported by .NET. This particular localisation does not generate a zh-tw directory in the output path:
image

I don't know exactly how this is currently working in osu!/from where it's managing to pull the string resources, but it causes issues such as:

  • The culture appears in JetBrains Rider's Localization Manager as its own entity:
    image
  • External rulesets can't include the zh-TW localisation (see: karaoke-dev/karaoke#1266)

Other projects, notably Humanizer and dotnet-roslyn use zh-Hans and zh-Hant in place of our zh and zh-TW locales respectively.

I can't really find any documentation on the supported culture codes - the closest I can find is documentation related to Bing maps which lists zh-Hans and zh-Hant: https://docs.microsoft.com/en-us/bingmaps/rest-services/common-parameters-and-types/supported-culture-codes, however we should be reasonably able to trust that JetBrains Rider's visualisation is accurate and that zh-TW is the only one which is unsupported.

[Proposal]Able to add the localization to all matched localization class.

Another request beside #53 is able to select and add the localization string to those matched localization class.
image
Will have more option like Like Insert the localization to the Chat/AAAStrings.cs and Insert the localization to the Chat/BBBStrings.cs

The proposal is figured out while implementing this issue.
karaoke-dev/karaoke#1365

It should be able merge into just two localization class named GeneratorStrings and DetectorStrings.
It will let the translation easy to be added if user can selected exist matched localization classes in the Localisation.

Analyser for incorrect usages of `[LocalisableDescription]`

When an attribute is present such as: [LocalisableDescription(typeof(Strings), nameof(Strings.ExampleFoo))], we should make sure that the nameof() part refers to some member in the Strings type. It's enough to provide an error-level inspection without a codefix.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.