Skip to content

Conversation

@mzner
Copy link
Contributor

@mzner mzner commented Oct 14, 2025

Description

Related Issue

Motivation and Context

How Has This Been Tested?

  • test environment:
  • test case 1:
  • test case 2:
  • ...

Screenshots (if appropriate):

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
  • Documentation
  • Maintenance (e.g. dependency updates or tooling)

Open tasks:

  • ...

@mzner mzner requested a review from LukasHirt October 14, 2025 10:11
@update-docs
Copy link

update-docs bot commented Oct 14, 2025

Thanks for opening this pull request! The maintainers of this repository would appreciate it if you would create a changelog item based on your changes.

@mzner mzner force-pushed the bugfix/OCISDEV-420/missing-translations branch from 1923500 to 7950921 Compare October 14, 2025 10:17
@mzner mzner force-pushed the bugfix/OCISDEV-420/missing-translations branch from 7950921 to 895ae89 Compare October 15, 2025 08:40
import { ConfigStore } from '@ownclouders/web-pkg'
import { useGettext } from 'vue3-gettext'

export const useContextualHelpers = (configStore: MaybeRef<ConfigStore>) => {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why is the configStore a parameter instead of using the pinia composable here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Just a preference instead of having the file depend on it -- it is more flexible when it is being passed. Can switch if you prefer. What do you think?

Copy link
Collaborator

Choose a reason for hiding this comment

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

I usually choose simplicity over flexibility. I.e. if a composable is dependent on a store which will not be different if it's called from component A or component B, I don't want to always have to pass it instead of having it once in the composable directly. If it would be some data that might change depending on the place where the composable is called, then parameters would be of course the way to go for me as well.

However, I don't want to impose my thinking on you so if you prefer it like this, I am fine with leaving it like it is.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fair point. 👍🏻

const spaceAddMemberHelp = computed(() => {
return shareSpaceAddMemberHelp({ configStore: unref(configStore) })
})
const spaceAddMemberHelp = shareSpaceAddMemberHelp
Copy link
Collaborator

Choose a reason for hiding this comment

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

Let's use it directly instead of wrapping it in the extra const?

const indirectLinkHelp = computed(() => {
return shareViaIndirectLinkHelp({ configStore })
})
const viaLinkHelp = shareViaLinkHelp
Copy link
Collaborator

Choose a reason for hiding this comment

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

Let's use it directly instead of wrapping it in the extra const?

return shareViaIndirectLinkHelp({ configStore })
})
const viaLinkHelp = shareViaLinkHelp
const indirectLinkHelp = shareViaIndirectLinkHelp
Copy link
Collaborator

Choose a reason for hiding this comment

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

Let's use it directly instead of wrapping it in the extra const?


// just a dummy function to trick gettext tools
function $gettext(msg: string) {
return msg
const { $gettext: getText } = useGettext()
Copy link
Collaborator

Choose a reason for hiding this comment

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

Would it be safe to completely remove this file? If not, I would at least revert this specific change and keep it as it was.

Copy link
Contributor Author

@mzner mzner Oct 15, 2025

Choose a reason for hiding this comment

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

I would say so. I searched the project and replaced where it has been used, but never say never. I will bring it back. :D

Copy link
Collaborator

Choose a reason for hiding this comment

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

Up to you. web-app-files is not published anywhere and is "only" bundled directly with Web, so if it's not used in this repo, there shouldn't be any other place that would use it. If you decide to keep this, it would be great to mark the exported code as deprecated using jsdocs though to make it clear it's not supposed to be used anymore.

@mzner mzner force-pushed the bugfix/OCISDEV-420/missing-translations branch 2 times, most recently from 5851bf5 to 188d3d0 Compare October 15, 2025 10:46
<span class="oc-ml-s" v-text="activity.template.variables?.user?.displayName" />
</div>
<div>activity unknown</div>
<div>{{ $gettext('activity unknown') }}</div>
Copy link
Collaborator

Choose a reason for hiding this comment

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

Since you're touching this and it will get synced to transifex, could you please double check whether it is correct behaviour that it starts with lowercase a? Feels a bit odd. Just to make sure that we push the correct string into transifex.

@mzner mzner force-pushed the bugfix/OCISDEV-420/missing-translations branch from 188d3d0 to 84a9f9e Compare October 15, 2025 12:02
@sonarqubecloud
Copy link

@mzner mzner merged commit c7af78b into master Oct 15, 2025
4 checks passed
@mzner mzner deleted the bugfix/OCISDEV-420/missing-translations branch October 15, 2025 17:56
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.

3 participants