question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. ItĀ collects links to all the places you might be looking at while hunting down a tough bug.

And, if youā€™re still stuck at the end, weā€™re happy to hop on a call to see how we can help out.

Write a tutorial using LinguiJS with React

See original GitHub issue

This is a HactoberFest issue! Read the contest details for more info.

Before you begin

  • Confirm that youā€™re working on this issue so I can add šŸ‘©ā€šŸ’»assigned label.
  • Use next branch as a base for your PR. This feature should be released in upcoming v3.
  • Read the contribution guide for info how to setup project, run tests and use development version of packages
  • Join us on gitter to get support

Starting point

  • Use the existing tutorial to learn about LinguiJS
  • Use create-react-app to bootstrap example project. You should use create-react-app v2.
  • Install @lingui/react and add @lingui/cli @lingui/macro as development dependencies

Content

  • You might use existing tutorial as a starting point but feel free to provide your own example.
  • (optional) The challenge is that existing tutorial is written for LinguiJS v2, but the new tutorial should be for v3. If you feel ambitious, checkout migration guide for the list of changes. Otherwise, feel free to write the tutorial for LinguiJS v2 and Iā€™ll rewrite examples afterwards. No big deal at all!
  • (optional) Donā€™t worry about formatting! The documentation uses reStructuredText. Itā€™s very similar to Markdown. If you find it confusing, focus on content and Iā€™ll fix the markup once itā€™s finished.
  • The tutorial should cover following topics:
    • Installation
    • Project setup (i18n manager, I18nProvider)
    • Trans component for messages, including how to use variables and inline tags
    • Translation of props using i18n manager (accessed through I18n render prop component or withI18n hoc)
    • Pluralization using Plural
    • Date/Number formatting using DateFormat and NumberFormat
    • Working with CLI (adding locales, extracting, compiling)
    • Loading catalogs into app (either directly or using @lingui/loader webpack loader)

Additional requirements

It might be beneficial if you have some experience with react-intl or any internationalization library. I believe for the best result you shouldnā€™t be too much familiar with LinguiJS. The tutorial should be for the first time users and for that reason itā€™s hard for me to write it.

This is a very long task, so it might take several hours to finish it. Feel free to reach me at gitter anytime.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:10 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
tricoder42commented, Oct 3, 2018

Iā€™ve just realized that writing the tutorial for v3 might be much easier that I thought. Thereā€™s already an example project. It doesnā€™t use create-react-app, but all new features from upcoming v3. All examples are basically in the main App.js file. The v3 prerelease is already published on NPM under next tag (npm install @lingui/cli@next, etc). Might be worth taking a look, because v3 fixes a lot of issues with CRA.

0reactions
stale[bot]commented, Oct 29, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Tutorial - Internationalization of React apps - LinguiJS - JS.ORG
Through this tutorial, we'll learn how to add internationalization (i18n) to an ... Follow setup guide either for projects using LinguiJS with Create...
Read more >
How to set up internationalization in React using Lingui.js
Here's how to integrate Lingui.js with a React app and add internationalization capabilities to your application.
Read more >
Localizing JavaScript & React Apps with LinguiJS | Phrase
LinguiJS is a small, robust JavaScript and React i18n library that feels lean and elegant compared to its well-established competitors.
Read more >
i18n of React with Lingui.js #1 - DEV Community ā€ ā€
This configuration will extract messages from source files inside src directory and write them into message catalogs in src/locales . AddĀ ...
Read more >
How to Localize JavaScript and React Apps with LinguiJS
Let's install Lingui in the app. Installing Lingui for React. I built the sample app with the Create React App starter template. If...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found