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

Localization Issues #172

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from
Draft

Conversation

jonrcarey
Copy link
Collaborator

  • The reported undesired behavior in Localization Issues #60 is actually native behavior.
  • Had to alter the native Statamic localised field behaviour.
  • It was not possible to detect when the field was synced or de-synced, as events are not passed down to this component (at least I couldn't find a solution to this) – might worth submitting this as a feature request.
  • Had to write tests to check this state instead.
  • If the field is de-synced and not focused, set meta_title to title.
  • If the field is synced and not focused, set meta_title to `` (an empty string).
  • Edge case: If the field is synced, but the sync status has not changed, set meta_title to `` (an empty string).
  • Finally, if localizedFields includes meta_title, return the value; otherwise, return `` (an empty string).
  • Please run further tests to detect other edge cases.
  • Have tested on a multi-site installation, but requires testing on a single-site installation also.
  • Not too familiar with Vue, but it has been determined that modifying the Vuex state outside of mutations/actions isn't best practice, so an alternative solution to state.values.meta_title = state.values.title may be necessary, for example.

@jonrcarey jonrcarey added the bug Something isn't working label Mar 17, 2024
@jonrcarey jonrcarey self-assigned this Mar 17, 2024
@jonrcarey jonrcarey changed the title Localization Issues #60 Localization Issues Mar 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant