fix bug value.replace is not a function - #3
Conversation
|
Interesting, I am using iOS transformation exclusively in my current project and I don't have this error. For instance, here is an output of We are using huge translation sheets and it works for all of them, the value is always a string... Could you somehow show me what sort of situation would fail? |
|
I have this issue in my iOS and Android projects. Implementation is like You described in ReadMe and I have error like this: (node:1692) UnhandledPromiseRejectionWarning: TypeError: value.replace is not a function My script: localizer.save("../app/src/main/res/values/strings.xml", { valueCol: 'English', format: 'android' }); |
|
@HelAsia thanks for the response. The usage use absolutely correct, I was just curious about the value received for the key in the transformer, so something along the lines of But I think I might have an idea about your case. You probably have a number as a localization value there. To be honest, I don't understand why a pure number value (and if you have text with a number, it's already going to work) should be as part of a localization. Basically, this sort of translation would break: This wouldn't (here it's still a number but formatter as "plain text"): Above, I just set number formatting to "plain text" and this already wouldn't break this utility without any code change: Once again, why would numbers be a part of localization and not code? I would like to know the use-case out of curiosity. |
|
can u merge it? |



fixed bug after last library update. Bug was "value.replace is not a function" during launch script.