Skip to content

Adding support for Swedish#22

Open
jopotts wants to merge 3 commits intodavidcelis:masterfrom
bookwhen:master
Open

Adding support for Swedish#22
jopotts wants to merge 3 commits intodavidcelis:masterfrom
bookwhen:master

Conversation

@jopotts
Copy link

@jopotts jopotts commented Jun 25, 2017

No description provided.

inflect.plural(/de$/i, 'der') # fiende, fiender

# -n
inflect.plural(/le$/i, 'lem') # muskel, muskler
Copy link
Owner

Choose a reason for hiding this comment

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

This comment is a typo, yeah?

Copy link
Author

Choose a reason for hiding this comment

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

Well spotted. I don't speak Swedish myself, but that's no excuse for a wrong comment! I took these inflections from directly from here:

https://github.com/mynewsdesk/swedish_pluralize/blob/master/lib/swedish_pluralize.rb

I had to change the order of some of the definitions to get the tests (which I created from the trailing comments) to pass too. I've got no idea if these are correct in fact so I'll get my translator to have a look and get back to you...

Choose a reason for hiding this comment

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

Yep, poor example. # muskeln, musklerna would be
inflect.plural(/n$/i, 'lerna') # muskeln, musklerna

@jopotts
Copy link
Author

jopotts commented Jun 27, 2017

I've fixed the comments and moved some inflections, added a couple more tests, and got the translator to check the tests and all look ok. I'm sure it's not perfect, but I think it's worth merging until we can find a Swedish speaking Ruby dev to come and improve. Thanks!

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants