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

refactor: lingui v2 to v3 #842

Closed
wants to merge 1 commit into from

Conversation

semoal
Copy link

@semoal semoal commented Apr 6, 2021

https://passculture.atlassian.net/browse/PC-7917

I couldn't start up the application :/ I'll need some guidance here.

Things done:

  • Inside test/utils.tsx extracted a render function with a wrapper with Lingui, in this way we don't need to wrap any render function on every test, also exports every function of testing library native so you could use that file for every test
  • Removed the _.(t) function because was useless, Lingui v3 is as simply as use the macro functions, there's no need to complex everything. https://lingui.js.org/ref/macro.html#examples-of-js-macros. IN some case you need to format currencies,numbers, or dates giving a locale, Lingui also exports date, and number macros but this ones are extracted from the @lingui/core library. **I've remember this because i saw hard-written dates formatted to iso but could be good to format them using the locale instead of the iso... **
  • Added lingui.config.js with a typedef for checking that the config is valid ;)
  • I've checked that running yarn test everything passed
  • Modified the add new locale and add new translation readmes to match latest lingui version
  • Also i saw that you use a lot unicode chars to give spaces to things, in Lingui v3 we strip this characters so just use html entities or basic templating

@kopax
Copy link
Contributor

kopax commented Apr 6, 2021

Hi @semoal, thanks for the work.

I couldn't start up the application :/ I'll need some guidance here.

I think you must have some secret keys to start the application. I'll have a check tomorrow and I will let you know. If tests pass that's already a good sign.

Thanks again!

@ALL lingui/js-lingui#1022 (comment)

@kopax-polyconseil kopax-polyconseil self-assigned this Apr 6, 2021
@kopax-polyconseil kopax-polyconseil changed the title refactor: lingui v2 to v3 (PC-7917)(Tech) refactor: lingui v2 to v3 Apr 7, 2021
@kopax-polyconseil kopax-polyconseil changed the title (PC-7917)(Tech) refactor: lingui v2 to v3 refactor: lingui v2 to v3 Apr 7, 2021
@kopax-polyconseil kopax-polyconseil changed the base branch from master to lingui-v3 April 7, 2021 11:59
@kopax-polyconseil
Copy link
Contributor

Closed in favor of #845

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants