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

Bug(transloco-optimize): Translation broken in production #739

Open
1 task done
utpaulBS23 opened this issue Jan 7, 2024 · 4 comments
Open
1 task done

Bug(transloco-optimize): Translation broken in production #739

utpaulBS23 opened this issue Jan 7, 2024 · 4 comments

Comments

@utpaulBS23
Copy link

utpaulBS23 commented Jan 7, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Which Transloco package(s) are the source of the bug?

Optimize

Is this a regression?

Yes

Current behavior

I pass configuration

{
                availableLangs: [
                    { id: 'en', label: 'English' },
                    { id: 'nb', label: 'Norwegian' }
                ],
                defaultLang: 'en',
                fallbackLang: 'en',
                reRenderOnLangChange: true,
                prodMode: true,
                flatten: {
                    aot: !isDevMode()
                }
            }
        }

And install optimize plugin and added script on package.json

"transloco:optimize": "transloco-optimize dist/wellbook/assets/i18n",
  "build:prod": "ng build --configuration production && npm run transloco:optimize", 

But still i get broken translation issue. I attach screen shot here

Screenshot 2024-01-07 at 3 32 09 PM

Expected behavior

Should be load translation as i share on menu
Screenshot 2024-01-07 at 6 39 31 PM

Should be work on production

Please provide a link to a minimal reproduction of the bug, if you won't provide a link the issue won't be handled.

Just have that conent

Transloco Config

{
                availableLangs: [
                    { id: 'en', label: 'English' },
                    { id: 'nb', label: 'Norwegian' }
                ],
                defaultLang: 'en',
                fallbackLang: 'en',
                reRenderOnLangChange: true,
                prodMode: true,
                flatten: {
                    aot: !isDevMode()
                }
            }
        }

Please provide the environment you discovered this bug in

Transloco: 6.0.4
Angular: 16.2.0
Node: v18.17.0
Package Manager: NPM
OS: ubuntu-latest

Browser

Chrome

No response

Additional context

No response

I would like to make a pull request for this bug

Yes 🚀

@shaharkazaz
Copy link
Collaborator

This is a very general issue.
Please provide a reproduction link as requested when opening an issue, IDK what I should see in this screenshot
Please share a before & after example.

@utpaulBS23
Copy link
Author

@shaharkazaz i added expected screenshot. As i saw this issue is only fix for window. Need to fix for ubuntu as well
#687

@shaharkazaz
Copy link
Collaborator

shaharkazaz commented Jan 7, 2024

@utpaulBS23 If you understand the issue, you are welcome to open a PR 👍

@utpaulBS23
Copy link
Author

@shaharkazaz i will create a demo project for that issue

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

No branches or pull requests

2 participants