Shopify / cli

Build apps, themes, and hydrogen storefronts for Shopify
https://shopify.dev
MIT License
417 stars 125 forks source link

[Bug]: <Locales files not updated> #4575

Open Fra1705 opened 3 days ago

Fra1705 commented 3 days ago

Please confirm that you have:

In which of these areas are you experiencing a problem?

Theme

Expected behavior

I expect that if I edit translation files under locales the edit will execute and allow me to see the changes. Using the Shopify cli with the Shopify theme dev command I should be able to see the updated files and I should also be able to release them with Shopify theme push

Actual behavior

When I edit the files under the locales folder the editing doesn't happen. Both if I use Shopify theme dev and if I use shopify theme push the files under locales do not update with my changes. I also tried to do Shopify theme pull but the files under locales are not updated with the changes.

For

Verbose output

2024-10-03T15:06:53.066Z: Running command theme push 2024-10-03T15:06:53.076Z: Ensuring that the user is authenticated with the Theme API with the following scopes: []

2024-10-03T15:06:53.076Z: Ensuring that the user is authenticated with the Admin API with the following scopes for the store svilippo-like-reply.myshopify.com: []

2024-10-03T15:06:53.077Z: Getting session store... 2024-10-03T15:06:53.078Z: Validating existing session against the scopes: [ "openid", "https://api.shopify.com/auth/shop.admin.graphql", "https://api.shopify.com/auth/shop.admin.themes", "https://api.shopify.com/auth/partners.collaborator-relationships.readonly", "https://api.shopify.com/auth/shop.storefront-renderer.devtools", "https://api.shopify.com/auth/partners.app.cli.access", "https://api.shopify.com/auth/destinations.readonly" ] For applications: { "adminApi": { "scopes": [], "storeFqdn": "svilippo-like-reply.myshopify.com" } }

2024-10-03T15:06:53.079Z: Sending Identity Introspection request to URL: https://accounts.shopify.com/oauth/introspection 2024-10-03T15:06:53.079Z: Sending POST request to URL https://accounts.shopify.com/oauth/introspection With request headers:

2024-10-03T15:06:53.405Z: Request to https://accounts.shopify.com/oauth/introspection completed in 326 ms With response headers:

2024-10-03T15:06:53.410Z: The identity token is valid: true 2024-10-03T15:06:53.410Z: The validation of the token for application/identity completed with the following results:

2024-10-03T15:06:53.983Z: Request to https://svilippo-like-reply.myshopify.com/admin/api/unstable/themes.json?fields=id%2Cname%2Crole%2Cprocessing completed in 565 ms With response headers:

2024-10-03T15:06:53.986Z: Getting development theme... 2024-10-03T15:06:53.987Z: Getting development theme... 2024-10-03T15:06:53.987Z: Getting development theme... 2024-10-03T15:06:53.988Z: Getting development theme...

Reproduction steps

  1. Change locales file, for example en.default.schema.json
  2. Run Shopify theme dev or push
  3. You cannot see the changes to the file

Operating System

MAC OS, Sonoma 14.0

Shopify CLI version (check your project's package.json if you're not sure)

3.68.0

Shell

iTerm2

Node version (run node -v if you're not sure)

20.12.1

What language and version are you using in your application?

No response

montalvomiguelo commented 17 hours ago

I could not replicate the issue using the steps provided. Am I missing something?

https://github.com/user-attachments/assets/171c0e6e-228f-46fb-8c11-ce175f19f4fc

frandiox commented 7 hours ago

I cannot reproduce this either locally with them dev. I've tried modifying locales/en.default.json and it triggers a browser page reloads accordingly and uploads the file. When modifying locales/en.default.schema.json, it also uploads the file and the theme editor UI changes when manually refreshing the page.

Any other tips to reproduce this problem?

Fra1705 commented 6 hours ago

Hi,

thanks for the support. I made a video. As you can see, while I edit a liquid file in sections, the reference is updated. For the locales en.default.schema file, if I modify it, no update is noticed. https://github.com/user-attachments/assets/34af7a8e-a18b-4a56-99eb-c32e44136057

To start development I downloaded the theme locally, setted my store with shopify theme list --store 'myshopifyUrl' and use Shopify theme dev command. It's not the first Shopify site I've followed and I don't usually have this type of problem. Is there any information I can give you to try to understand where the problem could be?

Thanks

montalvomiguelo commented 58 minutes ago

Are locales included in your .shopifyignore file?

Fra1705 commented 15 minutes ago

I found, it's a problem with the Shopifyignore.

.git/ .gitignore .idea js/ scss/ gulpfile.js package.json package-lock.json node_modules .DS_Store images/ img/ .vscode/ .babelrc README.md templates/*/.json templates/customers/*/.json config/.json sections/.json

js/*

excludes files under locales. I have some js files under a folder and I needed to insert it into the Shopifyignore, however it seems that inserting only js/* also takes other files like the ones under locales. Is this an expected behavior?