Rename Inlangs message id to „name“ or „key“. #1391
-
In the current state of Inlang sdk and eco system, the "Id" property, which is used for querying messages in CRUD operations, actually represents a messages name or key not the identifier. When it comes to an Id, it's important to note that the message name lacks a crucial property - immutability. You can find more information on this topic here: Link to Immutable Identifiers. The historical reason for this lack of immutability is due to the absence of immutable Ids in most message formats available. For instance, in i18next, it functions as a key-value store where the message name points to its variants, either in a flat structure or nested. Why is an immutable id important if almost all string files out ther lack on an identifier? While the absence of an immutable Id isn't currently a problem for Inlang's existing feature set, it will become a requirement for future iterations to enable the implementation of features such as:
It's crucial to consider this change as soon as possible, even if these features may be part of future plans. The Id is extensively integrated into Inlang's infrastructure because it plays a central role in core CRUD actions, like the example below:
While the discussion regarding the Id system is a separate topic, I recommend initiating a discussion on this matter and referencing it here. Delaying this change will only result in exponentially growing challenges as Inlang's ecosystem and adoption continue to expand. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
We discussed this already. I oppose renaming A translator/designer/developer will make the mistake of renaming a message-id exactly once. Through version control, the old message id can be retrieved. |
Beta Was this translation helpful? Give feedback.
-
did we agree on the following? What
Why
|
Beta Was this translation helpful? Give feedback.
@martin-lysk
did we agree on the following?
What
Why
name
is possible in a non-breaking manner in the future