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

[full-ci] Vue 3: Use vue3-gettext #8257

Merged
merged 7 commits into from
Jan 18, 2023
Merged

[full-ci] Vue 3: Use vue3-gettext #8257

merged 7 commits into from
Jan 18, 2023

Conversation

JammingBen
Copy link
Collaborator

@JammingBen JammingBen commented Jan 17, 2023

Description

Use vue3-gettext and get rid of the old version.

We also removed the store from the defaults.js file as we now handle this in announceStore(). This was not necessary for this PR, but since we touched that code anyways we thought it would be nicer.

#7948

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Technical debt
  • Tests

@JammingBen JammingBen force-pushed the use-vue3-gettext branch 2 times, most recently from 19e2c76 to 323475d Compare January 17, 2023 15:28
@JammingBen JammingBen changed the title Vue3: Use vue3-gettext Vue 3: Use vue3-gettext Jan 17, 2023
@owncloud owncloud deleted a comment from update-docs bot Jan 17, 2023
@ownclouders
Copy link
Contributor

ownclouders commented Jan 17, 2023

Results for acceptance oC10 https://drone.owncloud.com/owncloud/web/31766/13/1

💥 The acceptance tests failed on retry. Please find the screenshots inside ...

webUIWebdavLockProtection-delete_feature-L33.png

webUIWebdavLockProtection-delete_feature-L33.png

webUIWebdavLockProtection-delete_feature-L34.png

webUIWebdavLockProtection-delete_feature-L34.png

@JammingBen JammingBen mentioned this pull request Jan 17, 2023
29 tasks
@dschmidt dschmidt changed the title Vue 3: Use vue3-gettext [full-ci] Vue 3: Use vue3-gettext Jan 17, 2023
packages/web-app-external/src/App.vue Outdated Show resolved Hide resolved
import translations from '../l10n/translations.json'

const config = {
language: 'en', // TODO BEFORE MERGE: Access current locale
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like that we removed this TODO BEFORE MERGE from master 😂

packages/web-app-preview/src/App.vue Outdated Show resolved Hide resolved
@JammingBen JammingBen marked this pull request as ready for review January 18, 2023 08:58
Copy link
Collaborator

@fschade fschade left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I only found a few things that are absolutely optional, just more to my personal taste :)

good work 🎸 !

@@ -24,6 +24,9 @@ describe('OcStatusIndicators', () => {
resource: fileResource,
indicators: [indicator],
target: 'test'
},
global: {
plugins: [...defaultPlugins()]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why spreading? unnecessary [Symbol.iterator]call.

defaultPlugins()

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Basically all tests have it this way, just because it is easier to add more plugins. We think the overhead can be neglect in the test suite.

@@ -35,6 +38,9 @@ describe('OcStatusIndicators', () => {
resource: fileResource,
indicators: [indicator],
target: 'test'
},
global: {
plugins: [...defaultPlugins()]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same

@@ -128,6 +128,7 @@ describe('OcTable.sort', () => {
data
},
global: {
plugins: [...defaultPlugins()],
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same

@@ -175,6 +176,7 @@ describe('OcTable.sort', () => {
sortDir: sortDirOld
},
global: {
plugins: [...defaultPlugins()],
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same ...

packages/web-app-files/src/mixins/actions/copy.js Outdated Show resolved Hide resolved
packages/web-app-files/src/mixins/actions/move.js Outdated Show resolved Hide resolved
store: Store<any>
}): Promise<void> => {
}): Promise<any> => {
const store = new Store({ ...storeOptions })
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if storeOptions are deep i would prefer to use Object.assign (shallow clone)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

... is shallow as well AFAIK. We just moved this part basically, it was like this before as well.

createGettext({
defaultLanguage: navigator.language.substring(0, 2),
silent: true,
...options
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you put the options spreading upfront? My personal taste :)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In this case we want options to possibly overwrite the defaults, so we need it in this order. The other cases above are valid though, I adjusted it 👍

@sonarcloud
Copy link

sonarcloud bot commented Jan 18, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 3 Code Smells

66.2% 66.2% Coverage
0.0% 0.0% Duplication

@dschmidt dschmidt merged commit 83c98ac into master Jan 18, 2023
@delete-merged-branch delete-merged-branch bot deleted the use-vue3-gettext branch January 18, 2023 10:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants