rubenv / angular-gettext-tools

Tools for extracting/compiling angular-gettext strings.
http://angular-gettext.rocketeer.be/
MIT License
39 stars 129 forks source link

Ignoring extraction when key === value #103

Open intellix opened 9 years ago

intellix commented 9 years ago

Our translators seem to have a thing for translating English to English even if they change nothing (maybe they like 100% completion in their tool of choice?).

After extraction, we have something like:

{
    "en-GB": {
        "Home": "Home",
        "Account": "Account",
        "Support": "Support"
    }
}

We could slap the translators and tell them to remove them all, but think a few would still slip by. I think it'd be great if extraction just did a key===value check and ignored the entry in such a case.

rubenv commented 9 years ago

I'm not entirely sure what it is that you are proposing.

Extraction doesn't know anything about translated strings.

Care to shed some light on this?

intellix commented 9 years ago

Apologies for saying extraction. I meant compilation :) when the PO is processed and the JSON is created. Would be good to skip entries where key === value

rubenv commented 9 years ago

Oh, right!

Makes sense. One minor thing: this would conflict with the (admittedly rather useless) debug mode.

alfaproject commented 9 years ago

How come it would conflict? o: