https://linen.dev logo
Join DiscordCommunities
Powered by
# haxe-ui
  • b

    bright-gpu-74537

    02/10/2023, 9:46 AM
    what the actual fuck
  • i

    icy-zebra-52882

    02/10/2023, 9:46 AM
    that's how polish works 😄
  • f

    full-journalist-82607

    02/10/2023, 9:46 AM
    Masculine for both because obviously you're talking about a form. ( You don't create a person 😉 ) . The user will think the form named Ian Harrigan
  • i

    icy-zebra-52882

    02/10/2023, 9:46 AM
    arabic has 6 plural forms iirc
  • i

    icy-zebra-52882

    02/10/2023, 9:46 AM
    at least for ordinal numbering, like "first", "second" etc.
  • b

    bright-gpu-74537

    02/10/2023, 9:46 AM
    ah, yeah, i thought it was 3... but yeah, even / odd ones seem mental
  • b

    bright-gpu-74537

    02/10/2023, 9:46 AM
    oh, its not even and odd
  • i

    icy-zebra-52882

    02/10/2023, 9:47 AM
    it's numbers ending in 1,2,3,4,5 and everything else I think
  • i

    icy-zebra-52882

    02/10/2023, 9:47 AM
    japanese has no plural, just the same singular form
  • f

    full-journalist-82607

    02/10/2023, 9:49 AM
    Japanese has kind of optional plural for some words.
  • b

    bright-gpu-74537

    02/10/2023, 9:51 AM
    alright, ive decided: im going to strip LocaleManager, and force all haxeui apps to be english... if i detect an accented character in a component value im going to
    throw UseEnglishException()
    🤣
  • f

    full-journalist-82607

    02/10/2023, 9:52 AM
    To be sure : make it only ascii , we can't risk to have some utf-8/16 here 😉
  • b

    bright-gpu-74537

    02/10/2023, 9:52 AM
    smart 😉
  • b

    bright-gpu-74537

    02/10/2023, 9:55 AM
    jesus:
  • b

    bright-gpu-74537

    02/10/2023, 9:55 AM
    "Plural-Forms: nplurals=2; plural=(n!=1);\n"
  • b

    bright-gpu-74537

    02/10/2023, 9:56 AM
    (english)
  • b

    bright-gpu-74537

    02/10/2023, 9:56 AM
    "Plural-Forms: nplurals=3; plural=((n==1)?(0):(((((n%10)>=2)&&((n%10)<=4))&&(((n%100)<10)||((n%100)>=20)))?(1):2));\n"
  • b

    bright-gpu-74537

    02/10/2023, 9:56 AM
    (polish)
  • i

    icy-zebra-52882

    02/10/2023, 9:57 AM
    that's why I needed to try to make a parser/tokeniser, to try to parse that kind of string at runtime for switching languages 😛
  • i

    icy-zebra-52882

    02/10/2023, 9:57 AM
    never did bother
  • b

    bright-gpu-74537

    02/10/2023, 9:57 AM
    so, for like 99% of use cases, a proper .po impl is sufficent?
  • i

    icy-zebra-52882

    02/10/2023, 9:58 AM
    yes
  • i

    icy-zebra-52882

    02/10/2023, 9:59 AM
    PO format uses the source string as the key though, so it's not quite the same as using coded strings (like fluent does), where you can do something like "intro.title.hello" = "Hello world"
  • i

    icy-zebra-52882

    02/10/2023, 10:00 AM
    instead the key itself would be "Hello world" (or "Hallo Welt" if the source language is german)
  • b

    bright-gpu-74537

    02/10/2023, 10:00 AM
    yeah, i really hate the format tbh... i think what i might do is implement .po and then maybe make a different format that ends up as (essentially) a .po
  • i

    icy-zebra-52882

    02/10/2023, 10:01 AM
    you might want to look at deepnight's existing implementation (doesn't support pluralisation): https://deepnight.net/tutorial/part-4-localize-texts-using-po-files/
  • b

    bright-gpu-74537

    02/10/2023, 10:02 AM
    so this:
  • b

    bright-gpu-74537

    02/10/2023, 10:02 AM
    Copy code
    msgid "1 comment"
    msgid_plural "@count comments"
    msgstr[0] "1 comment"
    msgstr[1] "@count comments"
  • b

    bright-gpu-74537

    02/10/2023, 10:02 AM
    would become something like this:
  • b

    bright-gpu-74537

    02/10/2023, 10:02 AM
    Copy code
    comments=1 comment
    coments.plural=@count comments
    coments.plural[0]=1 comment
    coments.plural[1]=@count comments
1...148614871488...1687Latest