Currently, we have two sources of truth for the source and the target languages: we store the values of the current source/target language both inside URL parameters and inside Vuex application state.
Storing the languages inside URL parameters is essential to provide support for several features that are based on prepared URLs. On the other hand, storing the languages inside the Vuex store, was our initial approach and is still in use in several places, but it's redundant and can be deprecated in favor of the URL params, so that we only have one single source of truth for these language values.
The following files should be updated to use the source/target language values from the URL, instead of the application state:
[x] useTranslationSave.js
[x] CXSuggestionList.vue
[x] useLanguageHelper.js
[x] CXTranslationWorkPublished.vue
[x] useDashboardInitialization.js
[] useDraftTranslationDelete.js
[x] useDraftTranslationStart.js
[x] SXArticleLanguageSelector.vue
[x] SXArticleSearch.vue
[x] SearchResultsCard.vue
[] ~~usePageTranslationStart.js~~
[x] SXContentComparator.vue
[] EditCompleteFeedback.vue
[] SXEditor.vue
[] useMtValidate.js
[] usePublishingComplete.js
[] SXSectionSelector.vue
[x] ProposedTranslationCard.vue
[x] SXSentenceSelector.vue
[] SXSentenceSelectorContentHeader.vue
[x] SXTranslationSelector.vue
[] TranslatedSegmentCard.vue
[x] useMtProvidersInitialize.js
[x] useSuggestionsInitialize.js
[] useConfirmationButtonClickHandlers.js
[x] useSuggestionSeeds.js
[] useSuggestionValidator.js
[x] useSuggestionsFetch.js
[x] useSuggestionFetchByMostPopular.js
[x] useSuggestionsFetchByEdits.js
[x] useSuggestionsFetchByTopics.js
[x] useSuggestions.js
The following files use the `sourceLanguageAutonym` and `targetLanguageAutonym` computed variables from `useApplicationState` composable, which depend on `sourceLanguage` and `targetLanguage` application state variables:
[x] useListSelector.js
[] CXTranslationSuggestion.vue
[x] SearchResultsCard.vue
[] SXSectionSelector.vue
[] useApplicationState.js
Once we remove the above usages, we can safely remove the `sourceLanguage` and `targetLanguage`variables from the application state, entirely.