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

[report] Production with Lingui v3 #1070

Closed
3 tasks
kopax-polyconseil opened this issue May 22, 2021 · 6 comments
Closed
3 tasks

[report] Production with Lingui v3 #1070

kopax-polyconseil opened this issue May 22, 2021 · 6 comments
Labels

Comments

@kopax-polyconseil
Copy link

kopax-polyconseil commented May 22, 2021

Describe the bug

Our project went to production this week, this ticket is made to track all the issue we have with lingui v3, and we have a lot

Todo:

  • : Cannot build application locally outside CI due to template literral not being interpolated locally
  • : Lingui is editing test translation during during CI build:
 FAIL  src/features/firstLogin/PrivacyPolicy/PrivacyPolicyModal.test.tsx (1316 MB heap size)
  ● <PrivacyPolicyModal /> › should render correctly

    expect(received).toMatchSnapshot()

    Snapshot name: `<PrivacyPolicyModal /> should render correctly 1`

    - Snapshot  - 1
    + Received  + 1

    @@ -258,11 +258,11 @@
                    }
                    testID="button-title"
                    textColor="#eb0055"
                    textSize={12}
                  >
    -               Politique des cookies
    +               Politique des cookies&lt;&lt;&lt;&lt;&lt;&lt;&lt; HEAD
                  </Text>
                </View>
  • Lingui is editing message during build

image

So far we are disabling lingui but we have pain to identify the root cause, as the CI and local build command are equal. This ticket is WIP, please keep it open.

@nakkamarra
Copy link
Contributor

nakkamarra commented May 26, 2021

I've run into this before. I don't think Lingui is editing anything, but rather your examples look like a merge conflict got committed in your source code. The documentation calls this out and if you check your source code / catalog files, there is probably some unwanted instance HEAD there. You should take care to check for merge conflicts in the source and catalogs before committing.

As far as template literral not being interpolated locally, if you'd provide an example, someone might be able to debug or provide a solution.

@semoal
Copy link
Contributor

semoal commented May 26, 2021

Yeah actually I was going to say the same about the first part, sometimes .po files gets conflicts and that >>>>> strings came from there.

About template literals not being interpolated locally was an issue with ESM builds, Lingui needs a development runtime to make it work and another for production, when I've introduced ESM I forgot to export that ESM development and just published ESM production...

Since 3.9.0 it's fixed, #1059

@kopax-polyconseil
Copy link
Author

Hi @semoal , we'll definitely try to upgrade to 3.9.0 asap.

Some of the errors we had were happening when generating the messages.po on a up to date branch. Since, we had to unplug some translation not to risk to display those.

I'll improve the report as soon as we'll have time to investigate the translation issues we have. Thanks!

@kopax-polyconseil
Copy link
Author

Hi @semoal, we just tested 3.9.0 and we still see the is not a function error on the same string as before in development.

I presume #1042 should be re-opened.

@vonovak
Copy link
Collaborator

vonovak commented Jun 14, 2021

Not that anyone asked for my opinion but I circled here browsing through the repo and reading #1022

I just wanted to give @semoal a friendly recommendation to think carefully before spending time with issues that do not provide clear reproduction steps (as explained in https://stackoverflow.com/help/minimal-reproducible-example). It appears that you even refactored the app in question to v3 in a huge PR and maybe even did that for free (!) - I admire such maintainer involvement but I just wanted to let you know that you could easily burn out doing too much of this kind of stuff.

Unfortunately, in my experience, people often take open source as a place to come for free tools and support. So please just make sure to take care of yourself and your mental health 👍 🙂

@stale
Copy link

stale bot commented Aug 14, 2021

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.

@stale stale bot added the wontfix label Aug 14, 2021
@stale stale bot closed this as completed Aug 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants