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.

Nested folder structure doesn't seem to work on Windows

See original GitHub issue
  • I am on the latest ember-intl version
  • I have searched the issues of this repo and believe that this is not a duplicate

Description

Hello. I tried to organize translations using nested folders. I can see the translations when I run the app locally on Mac, but another developer who works on Windows has been seeing “missing translation” error.

image

When I removed nested folder structure (i.e. have 1 file, translations/en-us.yaml), both of us could see the translations. I wondered if there may be an OS issue with joining directory paths that ember-intl isn’t accounting for.

https://github.com/ember-intl/ember-intl/issues/159 seemed to be a similar past issue that arose due to OS differences.

Environment

  • Ember Version: 3.21.3
  • Ember CLI Version: 3.18.0
  • Ember Intl Version: 5.5.0
  • Browser(s): Chrome (on Mac), Edge (on Windows)
  • Node Version: 10.22.1

Steps to Reproduce

I haven’t tested this with the other developer, but believe the steps may be:

  1. Create a new Ember app and install ember-intl.
  2. Set wrapTranslationsWithNamespace to true in config/ember-intl.js.
  3. Create a component: ember g component parent/child.
  4. In the component’s template, add a translation {{t "components.parent.child.some-text"}}.
  5. Create the translation for some-text in translations/components/parent/child/en-us.yaml file.
  6. Call the <Parent::Child> component in app/templates/application.hbs.

When I removed nested folder structure, I set wrapTranslationsWithNamespace back to false.

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
ijlee2commented, Sep 20, 2022

@asanzo Thanks for checking both pull requests. I tried to see if the test provided in #1626 would pass in #1648. Unfortunately, there may need to be additional test setup in order for path.sep to take the mocked value of \\.

I asked the PR author to rebase their branch so that we can at least confirm that the existing tests will pass in CI.

0reactions
asanzocommented, Sep 20, 2022

#1626 was tested but doesn’t work.

#1648 does indeed solve the problem.

Read more comments on GitHub >

github_iconTop Results From Across the Web

deeply nested folder cant be deleted. error comes back ...
1) Did you try taking ownership first of folder and then all of the files inside - using this handy right click shortcut...
Read more >
How do I delete a folder which is nested quite deep and avoid ...
To fix it, just rename each folder to a one-character folder-name until it is no longer too long to delete: Rename C:\Dir1 to...
Read more >
Tree view of a directory/folder in Windows? - Stack Overflow
Select folder · Press Shift, right-click mouse, and select "Open command window here" · Type tree /f > tree.txt and press Enter ·...
Read more >
Working with the File Explorer in Windows 10 - Georgetown UIS
If you've used previous versions of Windows, you know that a folder name would have a plus sign next to it if that...
Read more >
Nested Folders - General Feature Requests - Evernote Forum
Tags feel like a secondary dimension (although important and capable). If I have to use tags to create my hierarchy, then I'm working...
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