Skip to content
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

Add linked message formatting #467

Merged
merged 4 commits into from
Nov 18, 2018
Merged

Conversation

exoego
Copy link
Collaborator

@exoego exoego commented Nov 17, 2018

Addresses #106.

This PR allows linked keys accept formatting modifier in the form of @.MODIFIER:key.

Supported modifiers are below.

  • upper: Uppercase all the letters.
  • lower:: Uppercase all the letters.

The suggested camel modifier is not implemented, since usually this Is Camel Case are expected for camel-case.

Instead of camel case, I think title-case such is useful, such as The Catcher in the Rye.
Anyway, implementing camel-case and/or title-case is not trivial, so we should consifer using npm module such as to-title-case or similar.

@codecov-io
Copy link

codecov-io commented Nov 17, 2018

Codecov Report

Merging #467 into dev will increase coverage by 0.04%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##              dev     #467      +/-   ##
==========================================
+ Coverage   96.59%   96.64%   +0.04%     
==========================================
  Files           9        9              
  Lines         647      655       +8     
==========================================
+ Hits          625      633       +8     
  Misses         22       22
Impacted Files Coverage Δ
src/index.js 99.62% <100%> (+0.01%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update fabc563...4431403. Read the comment docs.


describe('linked translation', () => {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Note: Some describe('linked translation', () => { lines are consolidated to single one.
I thinkt it is better to describe one concept that has several test cases.

Before

linked translation
 ✔️ should foo
linked translation
 ✔️ should bar
linked translation
 ✔️ should buz

After

linked translation
 ✔️ should foo
 ✔️ should bar
 ✔️ should buz

Copy link
Owner

@kazupon kazupon left a comment

Choose a reason for hiding this comment

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

Excellent work!

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