Double underscore string formatting function in UI components #4548

Closed
opened 2020-07-17 18:49:58 +02:00 by ycohen-dev · 2 comments
ycohen-dev commented 2020-07-17 18:49:58 +02:00 (Migrated from github.com)

I find all over the codebase , any time we're dealing with a string that will be presentable in the UI,
a call to a string formatting function (I persume) - that looks like this:
property=__('text')

I have tried to look it up in ES6 documentation and React documentation to no avail.

I'm 99% sure I'm missing somethin fundemental , and if I am - please direct me toward the right documentations.

If I'm not - and it is an internal function - does it have something with locating texts from a resource file? maybe something like:
__('LookupThisKeyInsideTranslatableStringFile')

I find all over the codebase , any time we're dealing with a string that will be presentable in the UI, a call to a string formatting function (I persume) - that looks like this: `property=__('text')` I have tried to look it up in ES6 documentation and React documentation to no avail. I'm 99% sure I'm missing somethin fundemental , and if I am - please direct me toward the right documentations. If I'm not - and it is an internal function - does it have something with locating texts from a resource file? maybe something like: `__('LookupThisKeyInsideTranslatableStringFile')`
kauffj commented 2020-07-17 19:30:38 +02:00 (Migrated from github.com)
https://github.com/lbryio/lbry-desktop/blob/master/ui/i18n.js#L56
ycohen-dev commented 2020-07-17 22:48:33 +02:00 (Migrated from github.com)

Thank you!

Thank you!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: LBRYCommunity/lbry-desktop#4548
No description provided.