Skip to content

Conversation

@illispi
Copy link

@illispi illispi commented Sep 21, 2025

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:

  • Finite -> "äärellinen" and different "invalid"
  • item -> "osio"
  • multiple -> "monikerta"
  • bytes as "tavumäärä" or "tavut" depending on context.

@vercel
Copy link

vercel bot commented Sep 21, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
valibot Ready Ready Preview Comment Oct 1, 2025 4:15am

@dosubot dosubot bot added size:M This PR changes 30-99 lines, ignoring generated files. documentation Improvements or additions to documentation labels Sep 21, 2025
@yslpn
Copy link
Contributor

yslpn commented Sep 24, 2025

Hi @illispi Thank you for contributing to the project.

  1. Do you know any Finnish-speaking developers who could check the translation?
  2. Please add fi to gitingone and run both build scripts to generate imports. Examples of changes
    fix(i18n): migrate Korean to correct ISO code 'ko' #1306

@fabian-hiller
Copy link
Owner

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!

@fabian-hiller fabian-hiller added enhancement New feature or request and removed documentation Improvements or additions to documentation labels Sep 28, 2025
@fabian-hiller fabian-hiller self-assigned this Sep 28, 2025
@dosubot dosubot bot added size:XL This PR changes 500-999 lines, ignoring generated files. and removed size:M This PR changes 30-99 lines, ignoring generated files. labels Sep 28, 2025
@illispi
Copy link
Author

illispi commented Sep 28, 2025

I got feedback on translation from Finnish speaker, but they seemed to have issues commenting to this PR thread though.

Copy link

@jhirvioja jhirvioja left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

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}`,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would just have Virheellinen luottokortti. Credit card is a credit card, a bank card (pankkikortti) can be a debit card

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}`,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe if max/min/notGraphemese are same, should max/min/notBytes be too? so notBytes should be Virheellinen tavumäärä instead of Virheelliset tavut

@fabian-hiller
Copy link
Owner

Thank you all! I will try to merge it next week.

@pkg-pr-new
Copy link

pkg-pr-new bot commented Sep 28, 2025

Open in StackBlitz

npm i https://pkg.pr.new/valibot@1318

commit: 4920c5a

Copy link

@komu komu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

// prettier-ignore
const language: Language = {
code: 'fi',
schema: (issue) => `Virheellinen tyyppi: Odotettiin ${issue.expected}, mutta saatiin ${issue.received}`,
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

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}`,
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link

@jhirvioja jhirvioja Sep 28, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

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}`,
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

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}`,
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd go with "IP-osoite", but OTOH, the original English is just "IP", so perhaps this is ok.

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}`,
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Päivämäärä-aika" is not Finnish. Perhaps "ajanhetki" or "ajankohta".

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"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?

Copy link

@jhirvioja jhirvioja Sep 28, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Virheellinen päivämäärämerkintä and Virheellinen päivämäärä-aikamerkintä would be pretty close to the concept

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

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}`,
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Again, I'm hard-pressed to find an end-user to whom "turvallinen kokonaisluku" makes sense.

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}`,
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know the context for this, so I can only guess what this means, but "osio" feel strange.

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}`,
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here as well, I'd prefer just "Virheellinen määrä tavuja/grafeemeja"

@illispi
Copy link
Author

illispi commented Sep 30, 2025

Thanks for feedback, I made most of the suggested changes, and also changed "osio" to "esine" and "turvallinen kokonaisluku" to "turvallinen numero"

@jhirvioja
Copy link

jhirvioja commented Sep 30, 2025

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 taulukko and its item is an alkio, not osio or esine.

@komu
Copy link

komu commented Sep 30, 2025

also changed "osio" to "esine" and "turvallinen kokonaisluku" to "turvallinen numero"

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.

@fabian-hiller
Copy link
Owner

I will probably merge this PR in 1 to 2 weeks. I am currently focused on Formisch a few other things.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request size:XL This PR changes 500-999 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants