Page 3 of 4

Re: Friday Facts #244 - Localised plurals & Modernisation progress

Posted: Sat May 26, 2018 2:48 pm
by steinio
luc wrote:Devs: you might also be interested to know that in some languages, currency is pluralized differently:

EN zero euros, one euro, two euros... (normal pluralization rules)
FR zéro euro, un euro, deux euros... (normal pluralization rules)
NL nul euro, een euro, twee euro... (always singular)
DE null euro, ein euro, zwei euro... (always singular)

There is currently no currency in the base game, but mods and the website might have it.
You are the einzigste who knows how to pluralise Euro in German. :P

Re: Friday Facts #244 - Localised plurals & Modernisation progress

Posted: Sat May 26, 2018 4:51 pm
by CodeZ
As gettext was mentioned here, I'll add some points for not using it for complex tasks (and rather use something else):
  • gettext assumes, that you use English as your base "C" language. That might usually be fine, but also might not. (This seems to be more or less hard-coded, since you cannot declare non-English plural forms for base language: msgid="%d minute", msgid_plural="%d minutes" and that's it.)
  • gettext (seemingly) cannot support strings that have multiple plurals within them, thus making "5 minutes, 1 second" a difficult string to implement. It can be worked around by defining the plurals separately, but makes the containing string a mess "%1$s, %2$s". (What if "seconds" should actually be before minutes? What needs to be changed? That isn't clear from the containing string.)
Otherwise gettext is good first step for "any" software project that contains strings that are displayed to user and does its job well. And is supported widely.

For the second point above there is actually a solution defined in ICU called MessageFormat: http://userguide.icu-project.org/formatparse/messages
This allows both multiple plurals and genders within same string. Granted the format is slightly verbose, there are parsing/rendering libraries for it at least for most popular (programming) languages.

For own implementations remember, that the rules of plurals are many. Fortunately Unicode/CLDR database provides them as a web site and xml definitions (http://www.unicode.org/cldr/charts/late ... rules.html).

Re: Friday Facts #244 - Localised plurals & Modernisation progress

Posted: Sat May 26, 2018 9:04 pm
by luc
steinio wrote:You are the einzigste who knows how to pluralise Euro in German. :P
Danke! I will be sure to bring that up in my job interview next Wednesday, where they'll assess whether I speak enough German to be useful to them :P

Re: Friday Facts #244 - Localised plurals & Modernisation progress

Posted: Sun May 27, 2018 7:48 pm
by Tricorius
Sanqui wrote:
thecatlover1996 wrote:Yay for not having to zoom in anymore to read the FFF on my phone! :D Next up: mobile-ready forum? ;)
I'll see what I can do ;)
Thanks so much for the responsive layout. I’d also love to see one for the forums.

Re: Friday Facts #244 - Localised plurals & Modernisation progress

Posted: Mon May 28, 2018 12:02 am
by bobingabout
whatever you do with graphics, as long as it is optimised for Windows 7, have fun. I'm still not a fan of anything released after 7. I have been playing with 10, but... it's not playing nice. (It's mostly the windows update thing that's bugging me)

Re: Friday Facts #244 - Localised plurals & Modernisation progress

Posted: Mon May 28, 2018 7:18 am
by AFD
When the 0.17 will be out?

Re: Friday Facts #244 - Localised plurals & Modernisation progress

Posted: Mon May 28, 2018 10:03 am
by ratchetfreak
OvermindDL1 wrote:
and in future we would like to create Vulkan and Metal backends
Oh there is no point in making a metal backend anymore, the authors of Vulkan (Khronos) made a metal/vulkan conversion library that let's vulkan run on metal (interestingly benchmarks show it to be faster than the equivalently written metal code due to optimizations the interface performs)
technically moltenVK was built by a third party and was licensable for quite a fee (aka not feasible to license for a small time dev), a year or so after that package was released as open source.

Re: Friday Facts #244 - Localised plurals & Modernisation progress

Posted: Mon May 28, 2018 11:11 am
by mrvn
OvermindDL1 wrote:
melind wrote:And here I thought localization of this sort of thing would have been standardized and wrapped into packages like timezones have been.

If you need, I'm fine with continuing to believe everyone speaks Czech or English. It's a fair assumption.
There are, the gettext style took over (there is a program gettext that this style came from but it is GPL, however it's been remade a hundred times at this point with better licenses, to various amounts of compliance).
While gettext, the tool, is GPL the libintl and libasprintf libraries are LGPL: https://www.gnu.org/software/gettext/ma ... enses.html

So it would be no problem to link libintl and libasprintf libraries in factorio and use gettext tools.

Re: Friday Facts #244 - Localised plurals & Modernisation progress

Posted: Mon May 28, 2018 6:34 pm
by Oktokolo
AFD wrote:When the 0.17 will be out?
It will probably be in time for xmas 2018.

Re: Friday Facts #244 - Localised plurals & Modernisation progress

Posted: Tue May 29, 2018 7:59 am
by bobingabout
AFD wrote:When the 0.17 will be out?
Give them time, they only started on it a few weeks ago, usually they take a few months before they have an unstable to test.

Re: Friday Facts #244 - Localised plurals & Modernisation progress

Posted: Tue May 29, 2018 8:04 am
by dee-
Two words:
gettext
Vulkan

Re: Friday Facts #244 - Localised plurals & Modernisation progress

Posted: Tue May 29, 2018 8:13 am
by dee-
steinio wrote:
luc wrote:Devs: you might also be interested to know that in some languages, currency is pluralized differently:

EN zero euros, one euro, two euros... (normal pluralization rules)
FR zéro euro, un euro, deux euros... (normal pluralization rules)
NL nul euro, een euro, twee euro... (always singular)
DE null euro, ein euro, zwei euro... (always singular)

There is currently no currency in the base game, but mods and the website might have it.
You are the einzigste who knows how to pluralise Euro in German. :P
btw - when you mean "a single one" don't say "einzigste" but say "einzige" as "einzige" does not have a superlative (there is nothing more singular than the singular).
The same goes for "optimal" as there is no "en: more optimal" or "de: optimalst" - it is already a superlative (there is nothing to improve on something that is already optimal).
Yes, I'm a grammar nazi. :twisted: :geek:

Re: Friday Facts #244 - Localised plurals & Modernisation progress

Posted: Tue May 29, 2018 2:31 pm
by OvermindDL1
ratchetfreak wrote:
OvermindDL1 wrote:
and in future we would like to create Vulkan and Metal backends
Oh there is no point in making a metal backend anymore, the authors of Vulkan (Khronos) made a metal/vulkan conversion library that let's vulkan run on metal (interestingly benchmarks show it to be faster than the equivalently written metal code due to optimizations the interface performs)
technically moltenVK was built by a third party and was licensable for quite a fee (aka not feasible to license for a small time dev), a year or so after that package was released as open source.
Huh, when did that happen and why does it not seem to be stated on the khronos moltenvk pages? Do you have links? As I recall the license was non-revocable (apache or so).

Re: Friday Facts #244 - Localised plurals & Modernisation progress

Posted: Tue May 29, 2018 3:13 pm
by ratchetfreak
OvermindDL1 wrote:
ratchetfreak wrote:
OvermindDL1 wrote:
and in future we would like to create Vulkan and Metal backends
Oh there is no point in making a metal backend anymore, the authors of Vulkan (Khronos) made a metal/vulkan conversion library that let's vulkan run on metal (interestingly benchmarks show it to be faster than the equivalently written metal code due to optimizations the interface performs)
technically moltenVK was built by a third party and was licensable for quite a fee (aka not feasible to license for a small time dev), a year or so after that package was released as open source.
Huh, when did that happen and why does it not seem to be stated on the khronos moltenvk pages? Do you have links? As I recall the license was non-revocable (apache or so).
https://moltengl.com/moltenvk/ though the pricing info for moltenvk there has been removed when it went open source.

From reading press releases it seems that Valve sponsored the release of moltenVK as an open source lib so that they didn't just lose that investment. They still have their other package so are not totally out of a revenue stream (and that sponsorship deal may also include a maintenance contract with moltenVK as well).

Re: Friday Facts #244 - Localised plurals & Modernisation progress

Posted: Wed May 30, 2018 6:48 am
by Broskev
I fear the plural forms for Czech language are not that easy as the website would suggest. The rule should be:

everything ending with 1 except 11 = minuta
everything ending with 2-4 except 12,13,14 = minuty
everything else = minut

1 minuta
2 minuty
3 minuty
4 minuty
5 minut
6 minut
...
21 minuta
22 minuty
23 minuty
24 minuty
25 minut
...

Re: Friday Facts #244 - Localised plurals & Modernisation progress

Posted: Wed May 30, 2018 7:17 am
by posila
Broskev wrote:I fear the plural forms for Czech language are not that easy as the website would suggest. The rule should be:

everything ending with 1 except 11 = minuta
everything ending with 2-4 except 12,13,14 = minuty
everything else = minut
According to http://prirucka.ujc.cas.cz/?id=792 both forms are correct, but I don't know anybody who would say 21 minuta, 22 minuty, ...
Po složených číslovkách končících na jeden, dva, tři, čtyři jsou v 1. p. možné tvary: dvacet jeden žák i dvacet jedna žáků, dvacet dva/tři/čtyři žáci i žáků nebo jedenadvacet i jednadvacet, dvaadvacet, třiadvacet, čtyřiadvacet žáků. Mluvnická shoda mezi podmětem vyjádřeným jmennou skupinou, která obsahuje číslovky jeden, dva, tři, čtyři, a přísudkem se řídí tvarem podstatného jména v podmětu. Je-li podstatné jméno v 1. p., nastupuje shoda podle posledního členu složené číslovky (dvacet jeden žák byl…, dvacet čtyři žáci byli…). Je-li podstatné jméno ve 2. p., pak je přísudkové sloveso ve středním rodě j. č.: dvacet jedna žáků (i jedenadvacet nebo jednadvacet žáků) bylo…, dvacet čtyři žáků (i čtyřiadvacet žáků) bylo… Tvary 2. p. jsou běžnější a přirozenější.

Re: Friday Facts #244 - Localised plurals & Modernisation progress

Posted: Wed May 30, 2018 7:22 am
by hoho
Omnifarious wrote:So, while DirectX probably has better performance when doing hardware rendering, it appears that OpenGL has the edge in software rendering.
Intel integrated GPUs are not quite the same as software rendering. In the CPUs that contain a GPU, the GPU part tends to take up more space than the CPU part (ignoring caches). In fact, some stuff could actually run better on an integrated GPU than a discrete one if there is lots of back and forth between the CPU and GPU - integrated has to go through local caches on same die while dedicated GPU goes through half your motherboard :)

Though having said that, I'm not really sure it makes much sense to try to optimize for a situation like yours that is effectively a software error somewhere on your OS/driver side.

Re: Friday Facts #244 - Localised plurals & Modernisation progress

Posted: Wed May 30, 2018 8:14 am
by bobingabout
dee- wrote:Two words:
gettext
Vulkan
Except where OGL and DX11 cover 99% of the audience, Vulkan is restricted to newer hardware.
I guess this excludes windows Vista users. (Only DX10 there)

Does Vulkan even work in windows 7? Because that's what I'm using, Windows 7.

Re: Friday Facts #244 - Localised plurals & Modernisation progress

Posted: Wed May 30, 2018 8:24 am
by posila
bobingabout wrote:Except where OGL and DX11 cover 99% of the audience, Vulkan is restricted to newer hardware.
I guess this excludes windows Vista users. (Only DX10 there)

Does Vulkan even work in windows 7? Because that's what I'm using, Windows 7.
Vulkan does work on Windows 7. Windows Vista has DirectX 11 if Platform Update was installed, but if you don't have it, the game will run in OpenGL.

Re: Friday Facts #244 - Localised plurals & Modernisation progress

Posted: Wed May 30, 2018 8:28 am
by rldml
bobingabout wrote:whatever you do with graphics, as long as it is optimised for Windows 7, have fun. I'm still not a fan of anything released after 7. I have been playing with 10, but... it's not playing nice. (It's mostly the windows update thing that's bugging me)
I don't want to scare you, but perhaps you should spend some more time in this os-stuff. Windows 7 will not get any security updates in less than two years from now (https://support.microsoft.com/en-us/hel ... fact-sheet), so you should have a working alternative before that date has come.

Alternatives to Windows 10 are actually Windows 8.1 (until 2023/01) or - of course - a Mac- or Linux-based computer.

Greetings, Ronny