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

exclude en-US localization from sources to allow flexibility #204

Open
atus opened this issue Apr 30, 2014 · 5 comments
Open

exclude en-US localization from sources to allow flexibility #204

atus opened this issue Apr 30, 2014 · 5 comments

Comments

@atus
Copy link
Contributor

atus commented Apr 30, 2014

It would be nice to be able to customize the English like other languages. I would like to remove the short forms for yesterday yes and do other fixes, but I have to edit the source files which is a maintenance nightmare.

@abritinthebay
Copy link
Owner

Hmmm will think on this. There are other knock on issues that this would cause.

Can you elaborate on the fixes? I'm trying to not diverge from the original DateJS formats for v1.

It sounds like this might end up being a later milestone fix

@atus
Copy link
Contributor Author

atus commented May 2, 2014

When parsed at 2014-05-02 13:45:00 I get this

  • "Yes": Thu May 01 2014 00:00:00 GMT+0200
  • "Say": Thu May 01 2014 00:00:00 GMT+0200

I have no idea where it picks up the second one. These are the ones I discovered that bother me most because they are common words. The first one is an abbreviation of yesterday, but I think the second one is a bug. I will keep a list and write them here as I find more.

I can fix the first one and other abbreviations easily if I can edit the localization files, I just change the regex. Most of this is customizing it to fit my needs. E.g., I want to disable short forms by editing the regex instead of writing some crazy configuration for this :)

@abritinthebay
Copy link
Owner

wow, that "say" one is... weird.

One of the features I want to keep of the current system is that en-US is the default (and always present). I think it's becoming clear that the solution I had of making the keys the en-US ones is not very maintainable right now though.

Will have to rework that.

@atus
Copy link
Contributor Author

atus commented May 2, 2014

I would use the keys from line 255 in i18n.js in all localization files and add rich documentation/comments to each localization file header or next to each key value pair to clearly state what is the purpose.

This way adding new keys and changing old values is easily done without maintenance.
A nice thing I like is that I can skip a key and he simply assumes the English version.

@abritinthebay
Copy link
Owner

Right, that's a feature that having the key be the original key allows with a lot of simplicity. Would have to change the logic a bunch to fix that.

In general though I think it requires a rethink of how that is organized...

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

No branches or pull requests

2 participants