New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/i18n enhancement #1290

Merged
merged 5 commits into from Oct 10, 2015

Conversation

Projects
None yet
2 participants
@s-ludwig
Member

s-ludwig commented Oct 10, 2015

This is an up-to-date version of #966.

ncoe and others added some commits Jan 26, 2015

Extending the i18n example to include plural translations. A pull
request may need to be made to the format functions in phobos since
they now strictly require an exact number of arguments.

@s-ludwig s-ludwig referenced this pull request Oct 10, 2015

Closed

Feature/i18n enhancement #966

@s-ludwig

This comment has been minimized.

Show comment
Hide comment
@s-ludwig

s-ludwig Oct 10, 2015

Member

I've reverted the variable renames and some other small things to make the diff smaller and better suited for a review. Also, if no translation is found, the incoming key is now selected based on the following logic instead of always returning the singular form: !ptxt.length || cnt == 1 ? txt : ptxt; (where ptxt is the plural form key).

The empty "msgid" entry is also still written as an entry, so that headers other than those necessary for plural form handling can also be processed by external code (and this makes an existing unit test pass).

Member

s-ludwig commented Oct 10, 2015

I've reverted the variable renames and some other small things to make the diff smaller and better suited for a review. Also, if no translation is found, the incoming key is now selected based on the following logic instead of always returning the singular form: !ptxt.length || cnt == 1 ? txt : ptxt; (where ptxt is the plural form key).

The empty "msgid" entry is also still written as an entry, so that headers other than those necessary for plural form handling can also be processed by external code (and this makes an existing unit test pass).

s-ludwig added a commit that referenced this pull request Oct 10, 2015

Merge pull request #1290 from rejectedsoftware/feature/i18n_enhancement
Add support for plural forms in the vibe.web.i18n module.

@s-ludwig s-ludwig merged commit bfd2b9f into master Oct 10, 2015

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
@ncoe

This comment has been minimized.

Show comment
Hide comment
@ncoe

ncoe Oct 10, 2015

Contributor

Works for me, although I still don't know what the integration server was choking on. Thanks for taking a look.

Contributor

ncoe commented Oct 10, 2015

Works for me, although I still don't know what the integration server was choking on. Thanks for taking a look.

@s-ludwig s-ludwig deleted the feature/i18n_enhancement branch Oct 10, 2015

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