cli icon indicating copy to clipboard operation
cli copied to clipboard

[Bug]: <Locales files not updated>

Open Fra1705 opened this issue 1 year ago • 5 comments

Please confirm that you have:

  • [x] Searched existing issues to see if your issue is a duplicate. (If you’ve found a duplicate issue, feel free to add additional information in a comment on it.)
  • [x] Reproduced the issue in the latest CLI version.

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:

  • User-Agent: Shopify CLI; v=3.68.0
  • Keep-Alive: timeout=30
  • Sec-CH-UA-PLATFORM: darwin
  • Content-Type: application/json

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

  • cache-control: no-cache, no-store, private, must-revalidate, max-age=0
  • content-type: application/json; charset=utf-8
  • etag: W/"a857f48f070d146a2249130a6c2e39c6"
  • server-timing: processing;dur=37, socket_queue;dur=1.195, edge;dur=1.018, util;dur=0.15, cfRequestDuration;dur=190.999985
  • x-request-id: d151f665-56ca-4eee-a537-44b354144aef-1727968013

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:

  • It's expired: false
  • It's invalid in identity: false

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:

  • content-type: application/json; charset=utf-8
  • server-timing: processing;dur=334, cfRequestDuration;dur=411.999941, ipv6
  • x-request-id: 17430e2b-5178-4b35-83f9-44aee8931369-1727968013

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

Fra1705 avatar Oct 03 '24 15:10 Fra1705

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

montalvomiguelo avatar Oct 06 '24 20:10 montalvomiguelo

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?

frandiox avatar Oct 07 '24 06:10 frandiox

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

Fra1705 avatar Oct 07 '24 07:10 Fra1705

Are locales included in your .shopifyignore file?

montalvomiguelo avatar Oct 07 '24 12:10 montalvomiguelo

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?

Fra1705 avatar Oct 07 '24 13:10 Fra1705

That's not the expected behavior. I'll look into it.

montalvomiguelo avatar Oct 14 '24 03:10 montalvomiguelo