diacritics / database

A reliable diacritics database with their associated ASCII characters
MIT License
11 stars 4 forks source link

Add Character Capital Entry (#27) #30

Closed Mottie closed 6 years ago

Mottie commented 6 years ago

The capital entry is now required.

It's a little concerning to me that all of the characters in the ar.json file are coming up with capital: false. Since I don't know the language, I wrote this script to add the value for me.

@hadithmv please review this new addition and let us know.

Mottie commented 6 years ago

I don't understand the CodeClimate issue...

File extract.js has 253 lines of code (exceeds 250 allowed). Consider refactoring.

The extract.js file has 394 lines of code; and why is this a limitation?

julkue commented 6 years ago

@Mottie This determines if you're developing modular. Usually, if you'd have a component that has such many lines, you can refactor it into multiple smaller peaces to keep things easier to manage (like I've done e.g. in mark.js -- not finished yet). So theoretically the build process can be splitted into multiple things, e.g. the generation of equivalents, the validation, the check for "und" characters and so one. Should I help split it up?

Mottie commented 6 years ago

Should I help split it up?

Please. I haven't had that much time to work on this project lately. I'll finish up the other PR.

Mottie commented 6 years ago

Question: When a "case" is set to "none", what decompose key should we use? Currently it's in "lowerCase":

"¿": {
  "case": "none",
  "mapping": {
    "decompose": {
      "lowerCase": "?"
    }
  }
}
julkue commented 6 years ago

@Mottie Good catch. From my point of view in this case the key shouldn't be named lowerCase. However, I'm unsure about a good name. "none" seems not to be self explanatory

Mottie commented 6 years ago

What if we use "value" for everything, but leave "titleCase" as an extra when the character is uppercase.

julkue commented 6 years ago
  1. Instead of

Each decompose value may need to be transformed into an upper, lower or title case

What about:

Each decompose value may need to be transformed into lower or upper and title case

Mottie commented 6 years ago

Ready for review.