Giter Site home page Giter Site logo

Comments (10)

Mgamerz avatar Mgamerz commented on September 23, 2024

0 is the number of items, while 1 is either file (if the number is 1) or files (if the number is not 1). Tajfun indicated this will be an issue in polish because they use some wacked out numbering system with words, but I don't know how this could be fixed as it seems other localisations use a completely different sentence structure.

from me3tweaksmodmanager.

HarHarLinks avatar HarHarLinks commented on September 23, 2024

as the interpolation can't do it justice, i suggest removing it in favor of {0} file(s) need(s) to be patched or need to patch {0} file(s), and the equivalent in localizations.

from me3tweaksmodmanager.

Tajfun403 avatar Tajfun403 commented on September 23, 2024

Writing alternate ending in brackets isn't really universal either. It'll look like a bit of mess even in English, not speaking about Polish and probably some other "advanced" languages.
I'd vote for Amount of files that need to be patched: {0}. It's not that nice, but I don't see other solution that wouldn't require language-specific rules.

from me3tweaksmodmanager.

Mgamerz avatar Mgamerz commented on September 23, 2024

We'd need to see how it looks in things like Polish first since this seems to be localization dependent. I can do some checking but I am not sure if final tokens (in this case, {1}) need to exist, or if it just skips them. I beleive the first tokens have to be since they are simply parsed in that order.

E.g. In english
{0} {1} need to be patched
(which resolves to:
0 files need to be patched
1 file needs to be patched
2 files need to be patched
etc.
)

In another language:
Amount of files to be patched: {0}

In the context of this string I think it looks proper how it does in english, but the string will probably need to be different in other languages instead of a 1:1 translation.

from me3tweaksmodmanager.

Mgamerz avatar Mgamerz commented on September 23, 2024

Remember you can move all of the tokens around as long as you keep the { }.

from me3tweaksmodmanager.

Tajfun403 avatar Tajfun403 commented on September 23, 2024

How would word need change its form when it's not a variable, but a static string? (looking at your examples. Only file is variable)
I'm afraid changing word order ain't gonna change anything when translating original sentence to Polish. Maybe Mellin would have an idea on hacking it around, but I don't have any. Switching to Amount of files to be patched: {0} would be the only solution without ternary.
When we talked about it first, I gave you this wonderful bit of ternary on how would formatting original sentence in Polish look like (and yeah I don't have strength to reformat it :D)

(x == 1) ? "{0} plik musi zostać naprawiony" : ( ( (x >= 2 && x < 5) || (x > 20 && (x % 10 >=2 && x % 10 < 5))) ? "{0} pliki muszą zostać naprawione" : "{0} plików musi zostać naprawionych" ), amountOfFiles.ToString()

from me3tweaksmodmanager.

HarHarLinks avatar HarHarLinks commented on September 23, 2024

I agree with Tajfun's suggestion of Amount of files that need to be patched: {0} or similar formulation.
Files to patch: {0}.
And yes, as mentioned earlier, even the need(s) in English is broken.

from me3tweaksmodmanager.

Mgamerz avatar Mgamerz commented on September 23, 2024

Files to patch: {0} would be an acceptable alternative in english I think. There is one more instance of this type of language in M3, Patched X files.

from me3tweaksmodmanager.

HarHarLinks avatar HarHarLinks commented on September 23, 2024

If you're referring to

<system:String x:Key="string_interp_patchedXY">Patched {0} {1}</system:String>

then this is already very close to the proposed solution. It works in German as is, or Patched files: {0}.

from me3tweaksmodmanager.

Mgamerz avatar Mgamerz commented on September 23, 2024

This was resolved to the following:

Number of files requiring patches: {0}

The PatchedXY string is no longer used.

from me3tweaksmodmanager.

Related Issues (20)

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.