Skip to content
This repository has been archived by the owner on Aug 22, 2018. It is now read-only.

Clean up translation files #775

Open
jniles opened this issue Sep 29, 2015 · 5 comments
Open

Clean up translation files #775

jniles opened this issue Sep 29, 2015 · 5 comments

Comments

@jniles
Copy link
Contributor

jniles commented Sep 29, 2015

Our translation files have become untenable, and I'm sure that 30% of the data inside them are either unused or duplicates. It would be nice to clean these up, and maybe even break them into smaller files to be concatenated during our build. It's a bit difficult working all in the same file at the moment.

@DedrickEnc
Copy link
Contributor

Breaking them into multiple files is good. that will preserve the work.

@jniles
Copy link
Contributor Author

jniles commented Oct 7, 2015

@DedrickEnc, thanks for the feedback.

I propose that we create a new directory called "modules", in the i18n directory that houses each translation JSON file. In this way, we will have

/i18n/modules/cash.json
/i18n/modules/sale.json
/i18n/modules/reports.json
# etc ...

What do you think? It's becoming increasingly difficult to add new translation files or fix/remove old ones. This change would definitely speed up my development!

@DedrickEnc
Copy link
Contributor

Why not not to put it in the same place then the .js, .html, .css file? (in each sub folder in partial) that way we will have for cash for example :

partials/cash/cash.js
partials/cash/cash.html
partials/cash/cash.css
partials/cash/en_cash.json
partials/cash/fr_cash.json

@jniles
Copy link
Contributor Author

jniles commented Oct 8, 2015

I don't think our translations can be (or should be!) split in that fashion. Currently, we have a property called "COLUMNS". Where does that go? It's used in every report, and most modules.

The point is to only ever translate a word/phrase one time and use it everywhere, not have a special translation for each module.

To clarify my proposal, there would be something like:

/i18n/modules/shared.json  # these are used all over
/i18n/modules/reports.json  # these are used all over
/i18n/modules/cash.json  # concerns cash_aux, primary_cash, cautions, etc..

You do bring up a point though, that this proposal doesn't distinguish between en.json and fr.json. Not sure where that would go just yet.

@DedrickEnc
Copy link
Contributor

So, this will influence each module in the client side, and It is nit easy because we discovered this fragility very late.
It seems good, we will talk about that after Tshikaji.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants