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

Comments

@cezaraugusto
Copy link
Member

@cezaraugusto cezaraugusto commented Jul 8, 2019

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.

@petemill
Copy link
Member

@petemill petemill commented Jul 8, 2019

Perhaps have a webpack plugin which converts grd to json

@petemill
Copy link
Member

@petemill petemill commented Jul 8, 2019

@NejcZdovc
Copy link
Member

@NejcZdovc NejcZdovc commented Jul 9, 2019

@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 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
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.