I am normally translating strings in the format __('labels.my long string'), where "my long string" on occasions contains periods.
Although the -w flag properly flattens the (supposed) array structure, the translation value ends up being the segment after the last period (LocalizationMissing, line 377).
Is this normal or it would be better to have something like the following at that line:
This would ensure that a translation of 'labels.Loading records...', for example, will have "Loading records..." as translation value.
If you think that 'output-flat''s behaviour should remain unchanged, then maybe a new flag for this could be added?
Thank you!
EDIT: already know what you're about to say - this special use case is not the intended use for output-flat and you're right. I am actually using too phrases in which it's ok to have the last segment as translation.
Yet, there are exceptions like the ones above. I am thinking that maybe we could use a special array config with keys which will don't get the explode treatment?
Hi,
I am normally translating strings in the format __('labels.my long string'), where "my long string" on occasions contains periods. Although the -w flag properly flattens the (supposed) array structure, the translation value ends up being the segment after the last period (LocalizationMissing, line 377).
Is this normal or it would be better to have something like the following at that line:
This would ensure that a translation of 'labels.Loading records...', for example, will have "Loading records..." as translation value.
If you think that 'output-flat''s behaviour should remain unchanged, then maybe a new flag for this could be added?
Thank you!
EDIT: already know what you're about to say - this special use case is not the intended use for output-flat and you're right. I am actually using too phrases in which it's ok to have the last segment as translation. Yet, there are exceptions like the ones above. I am thinking that maybe we could use a special array config with keys which will don't get the explode treatment?
Added a pull request for this.