React-i18next: Simplify key name for convenience: (i18nKey) -> (id)

Created on 9 Mar 2020  路  3Comments  路  Source: i18next/react-i18next

Is your feature request related to a problem? Please describe.
It is tedious and frustrating to have to type the keys i, 1, 8, n, shift + K, e, y several times per screen.

Describe the solution you'd like
Would you be able to accommodate a simpler key? id as an alias sounds great and there's no breaking changes. This key name is actually used by several other libs including react-intl and angular i18n

This looks much simpler and easier to type when you're doing it 10 time per screen.

<Trans id="my.key" />

Additionally, you will be saving some keys from excessive wear and tear :)

keys

Thank you for considering!

Most helpful comment

haha...id, name and key I tried to avoid those because either have special meaning in html elements or react elements -> but nothing against a PR making id a fallback for i18nKey

All 3 comments

haha...id, name and key I tried to avoid those because either have special meaning in html elements or react elements -> but nothing against a PR making id a fallback for i18nKey

@simoami can this be closed?

Yep, this can be addressed in a separate PR.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Flo-Slv picture Flo-Slv  路  4Comments

ezze picture ezze  路  4Comments

leandrocamacho picture leandrocamacho  路  4Comments

ChCosmin picture ChCosmin  路  4Comments

tankpower1 picture tankpower1  路  3Comments