Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Hi @illispi Thank you for contributing to the project.
|
|
I can also finalize the PR (run the script etc.). But if you know another native speaking developer who can review your translations, that would be great! |
|
I got feedback on translation from Finnish speaker, but they seemed to have issues commenting to this PR thread though. |
jhirvioja
left a comment
There was a problem hiding this comment.
Couple of comments, otherwise looks solid and good Finnish to me. Variables looked fine as well by eye, and tested to match like so:
➜ ~ grep -o "issue.received" en.ts | wc -l
73
➜ ~ grep -o "issue.received" fi.ts | wc -l
73
➜ ~ grep -o "issue.expected" en.ts | wc -l
34
➜ ~ grep -o "issue.expected" fi.ts | wc -l
34
packages/i18n/src/fi.ts
Outdated
| checkAsync: (issue) => `Virheellinen syöte: Saatiin ${issue.received}`, | ||
| checkItems: (issue) => `Virheellinen osio: Saatiin ${issue.received}`, | ||
| checkItemsAsync: (issue) => `Virheellinen osio: Saatiin ${issue.received}`, | ||
| creditCard: (issue) => `Virheellinen luotto/pankkikortti: Saatiin ${issue.received}`, |
There was a problem hiding this comment.
I would just have Virheellinen luottokortti. Credit card is a credit card, a bank card (pankkikortti) can be a debit card
packages/i18n/src/fi.ts
Outdated
| multipleOf: (issue) => `Virheellinen monikerta: Odotettiin ${issue.expected}, mutta saatiin ${issue.received}`, | ||
| nanoid: (issue) => `Virheellinen Nano ID: Saatiin ${issue.received}`, | ||
| nonEmpty: (issue) => `Virheellinen pituus: Odotettiin ${issue.expected}, mutta saatiin ${issue.received}`, | ||
| notBytes: (issue) => `Virheelliset tavut: Odotettiin ${issue.expected}, mutta saatiin ${issue.received}`, |
There was a problem hiding this comment.
Maybe if max/min/notGraphemese are same, should max/min/notBytes be too? so notBytes should be Virheellinen tavumäärä instead of Virheelliset tavut
|
Thank you all! I will try to merge it next week. |
commit: |
komu
left a comment
There was a problem hiding this comment.
Looks pretty good. I added some nitpicky comments, take them as you will.
Overall, I think a lot of the messages feel a bit forced because of the common format "Virheellinen X: ..."
But then again, there's value in consistency, so I guess it's a decent approach. The style is not something that one would use in an actual application, but it's a reasonable one-size-fits-all solution for this kind of thing.
packages/i18n/src/fi.ts
Outdated
| // prettier-ignore | ||
| const language: Language = { | ||
| code: 'fi', | ||
| schema: (issue) => `Virheellinen tyyppi: Odotettiin ${issue.expected}, mutta saatiin ${issue.received}`, |
There was a problem hiding this comment.
In English having a capital letter after a colon is natural, but in Finnish it feels awkward and unprofessional.
I'd use "Virheellinen tyyppi: odotettiin ..." here and similarly for the other cases.
packages/i18n/src/fi.ts
Outdated
| creditCard: (issue) => `Virheellinen luottokortti: Saatiin ${issue.received}`, | ||
| cuid2: (issue) => `Virheellinen Cuid2: Saatiin ${issue.received}`, | ||
| decimal: (issue) => `Virheellinen desimaaliluku: Saatiin ${issue.received}`, | ||
| digits: (issue) => `Virheellinen numeromäärä: Saatiin ${issue.received}`, |
There was a problem hiding this comment.
Of course "numeromäärä" is technically correct, but as it's not a well-known concept, it gives a pause when reading. My first instinct was that it was "lukumäärä" spelled wrong. I'd write "Virheellinen numeroiden määrä" instead.
There was a problem hiding this comment.
Of course "numeromäärä" is technically correct, but as it's not a well-known concept, it gives a pause when reading. My first instinct was that it was "lukumäärä" spelled wrong. I'd write "Virheellinen numeroiden määrä" instead.
I think it is supposed to error when it is not a digit (so when it is not 0-9). "Virheellinen numeroiden määrä" would be confusing as well.. this is a tricky one, but maybe just Virheellinen numero would be sufficient
packages/i18n/src/fi.ts
Outdated
| endsWith: (issue) => `Virheellinen loppu: Odotettiin ${issue.expected}, mutta saatiin ${issue.received}`, | ||
| everyItem: (issue) => `Virheellinen osio: Saatiin ${issue.received}`, | ||
| excludes: (issue) => `Virheellinen sisältö: Odotettiin ${issue.expected}, mutta saatiin ${issue.received}`, | ||
| finite: (issue) => `Virheellinen äärellinen luku: Saatiin ${issue.received}`, |
There was a problem hiding this comment.
I don't know the context for this, but I'm hard-pressed to figure out a case where this would make sense, at least to an end-user. Would just "Virheellinen luku" lose too much information?
On the other hand, it feels like most of these texts are aimed at a developer or technical user audience. So perhaps I'm nitpicking here.
There was a problem hiding this comment.
I don't know the context for this, but I'm hard-pressed to figure out a case where this would make sense, at least to an end-user. Would just "Virheellinen luku" lose too much information?
On the other hand, it feels like most of these texts are aimed at a developer or technical user audience. So perhaps I'm nitpicking here.
For sure meant at a developer or technical user of valibot. I believe if such errors are shown to end users, they can (and probably should) be customized
packages/i18n/src/fi.ts
Outdated
| imei: (issue) => `Virheellinen IMEI: Saatiin ${issue.received}`, | ||
| includes: (issue) => `Virheellinen sisältö: Odotettiin ${issue.expected}, mutta saatiin ${issue.received}`, | ||
| integer: (issue) => `Virheellinen kokonaisluku: Saatiin ${issue.received}`, | ||
| ip: (issue) => `Virheellinen IP: Saatiin ${issue.received}`, |
There was a problem hiding this comment.
I'd go with "IP-osoite", but OTOH, the original English is just "IP", so perhaps this is ok.
packages/i18n/src/fi.ts
Outdated
| ipv4: (issue) => `Virheellinen IPv4: Saatiin ${issue.received}`, | ||
| ipv6: (issue) => `Virheellinen IPv6: Saatiin ${issue.received}`, | ||
| isoDate: (issue) => `Virheellinen päivämäärä: Saatiin ${issue.received}`, | ||
| isoDateTime: (issue) => `Virheellinen päivämäärä-aika: Saatiin ${issue.received}`, |
There was a problem hiding this comment.
"Päivämäärä-aika" is not Finnish. Perhaps "ajanhetki" or "ajankohta".
There was a problem hiding this comment.
"Päivämäärä-aika" is not Finnish. Perhaps "ajanhetki" or "ajankohta".
But it is descriptive of the technical concept though, as isoDateTime as "iso-ajanhetki" or "iso-ajankohta" doesn't mean anything. Or how would you differentiate it from isoDate?
There was a problem hiding this comment.
Virheellinen päivämäärämerkintä and Virheellinen päivämäärä-aikamerkintä would be pretty close to the concept
There was a problem hiding this comment.
The product of date (päivämäärä) and a time of day (kellonaika) is a datetime (ajanhetki).
Of course there is some ambiguity if it's local or associated with a time-zone. But the same ambiguity is present in the English version.
Anyway, I've never seen the word "päivämäärä-aika" in Finnish, and it feels like clumsy anglicism.
But go do whatever you feel is best. I'm just giving my 5 cents and you're free to ignore that if I seem too pedantic. I don't wish to force anything upon you, just giving feedback from one perspective.
There was a problem hiding this comment.
feels like clumsy anglicism
Like most programming terms translated to Finnish 😅
Your perspective is ofc valued - and you are correct about this part:
The product of date (päivämäärä) and a time of day (kellonaika) is a datetime (ajanhetki)
Virheellinen ISO-päivämäärä and Virheellinen ISO-päivämäärä- ja aika I guess would be most descriptive but no longer mirrors en.ts
There was a problem hiding this comment.
Virheellinen ISO-päivämäärä- ja aika
Isn't the hyphen in the wrong place here? That would imply that we have a prefix of a compound word. Like "koiran- ja kissanruokaa" is short for "koiranruokaa and kissanruokaa".
But perhaps "Virheellinen ISO-päivämäärä ja -aika" would work.
There was a problem hiding this comment.
Virheellinen ISO-päivämäärä- ja aika
Isn't the hyphen in the wrong place here? That would imply that we have a prefix of a compound word. Like "koiran- ja kissanruokaa" is short for "koiranruokaa and kissanruokaa".
But perhaps "Virheellinen ISO-päivämäärä ja -aika" would work.
Yes, it actually is and this is correct.
packages/i18n/src/fi.ts
Outdated
| octal: (issue) => `Virheellinen oktaaliluku: Saatiin ${issue.received}`, | ||
| partialCheck: (issue) => `Virheellinen syöte: Saatiin ${issue.received}`, | ||
| regex: (issue) => `Virheellinen muoto: Odotettiin ${issue.expected}, mutta saatiin ${issue.received}`, | ||
| safeInteger: (issue) => `Virheellinen turvallinen kokonaisluku: Saatiin ${issue.received}`, |
There was a problem hiding this comment.
Again, I'm hard-pressed to find an end-user to whom "turvallinen kokonaisluku" makes sense.
packages/i18n/src/fi.ts
Outdated
| regex: (issue) => `Virheellinen muoto: Odotettiin ${issue.expected}, mutta saatiin ${issue.received}`, | ||
| safeInteger: (issue) => `Virheellinen turvallinen kokonaisluku: Saatiin ${issue.received}`, | ||
| size: (issue) => `Virheellinen koko: Odotettiin ${issue.expected}, mutta saatiin ${issue.received}`, | ||
| someItem: (issue) => `Virheellinen osio: Saatiin ${issue.received}`, |
There was a problem hiding this comment.
I don't know the context for this, so I can only guess what this means, but "osio" feel strange.
packages/i18n/src/fi.ts
Outdated
| mac48: (issue) => `Virheellinen 48-bit MAC: Saatiin ${issue.received}`, | ||
| mac64: (issue) => `Virheellinen 64-bit MAC: Saatiin ${issue.received}`, | ||
| maxBytes: (issue) => `Virheellinen tavumäärä: Odotettiin ${issue.expected}, mutta saatiin ${issue.received}`, | ||
| maxGraphemes: (issue) => `Virheellinen grafeemimäärä: Odotettiin ${issue.expected}, mutta saatiin ${issue.received}`, |
There was a problem hiding this comment.
Here as well, I'd prefer just "Virheellinen määrä tavuja/grafeemeja"
|
Thanks for feedback, I made most of the suggested changes, and also changed "osio" to "esine" and "turvallinen kokonaisluku" to "turvallinen numero" |
Sorry to not catch this earlier, but Valibots' item is an item of an array. In Finnish an array is |
This is wrong. "Numero" means "digit" and not "number". The correct translation for "number" is "luku". These often get mixed up because "number" and "numero" are such similar words. |
|
I will probably merge this PR in 1 to 2 weeks. I am currently focused on Formisch a few other things. |
|
This PR is still on my list. Sorry for the delay. |
As requested here #1290 I made the Finnish I18n translation.
I am native speaker, but hopefully someone can double check.
These were bit cumbersome, other opinions welcome: