Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Find a way to expose locale files to Storybook #5179

Open
cezaraugusto opened this issue Jul 8, 2019 · 4 comments
Open

Find a way to expose locale files to Storybook #5179

cezaraugusto opened this issue Jul 8, 2019 · 4 comments
Labels
dev-setup l10n priority/P5 Not scheduled. Don't anticipate work on this any time soon.

Comments

@cezaraugusto
Copy link
Contributor

After brave/brave-core#2857 we have two locales for the same features, one for brave-core (real one that goes to Transifex) and another one for storybook prototyping (named fakeLocale).

Ideally we could have both places using the same source. As far as I know Storybook can only read JavaScript, so maybe outputting results in .grd files as JSON? I don't think it's possible without much work but having a single JSON file similar to extension's messages would be ideal.

cc @petemill @mkarolin I don't think this is top priority but would be cool to have your input about what we can do right now with as low effort/time as possible.

@cezaraugusto cezaraugusto added l10n dev-setup priority/P5 Not scheduled. Don't anticipate work on this any time soon. labels Jul 8, 2019
@petemill
Copy link
Member

petemill commented Jul 8, 2019

Perhaps have a webpack plugin which converts grd to json

@petemill
Copy link
Member

petemill commented Jul 8, 2019

@NejcZdovc
Copy link
Contributor

@petemill I think that we will need to first parse .grd then find associated _source.cc so that we will get correct keys for associated translation

@petemill
Copy link
Member

petemill commented Jul 9, 2019

@NejcZdovc that's a good point, unless we start to use the c++ IDs in JS and remove the go-between layer, e.g. locale.getString('IDS_BRAVE_WELCOME_PAGE_MAIN_TITLE')

tmancey pushed a commit that referenced this issue Apr 9, 2020
…option_fix_1.7.x

Fixed 3rd party cookies blocking behavior (uplift to 1.7.x)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dev-setup l10n priority/P5 Not scheduled. Don't anticipate work on this any time soon.
Projects
None yet
Development

No branches or pull requests

3 participants