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

heatmap: untranslated string: xx total contributions in the last 12 months #10669

Closed
Tracked by #19902
dadosch opened this issue Mar 8, 2020 · 9 comments · Fixed by #24131
Closed
Tracked by #19902

heatmap: untranslated string: xx total contributions in the last 12 months #10669

dadosch opened this issue Mar 8, 2020 · 9 comments · Fixed by #24131
Labels
issue/confirmed Issue has been reviewed and confirmed to be present or accepted to be implemented topic/ui Change the appearance of the Gitea UI

Comments

@dadosch
Copy link

dadosch commented Mar 8, 2020

Description

The string in the heatmap is not translated:

xx total contributions in the last 12 months

template: '<div><div v-show="isLoading"><slot name="loading"></slot></div><h4 class="total-contributions" v-if="!isLoading"><span v-html="totalContributions"></span> total contributions in the last 12 months</h4><calendar-heatmap v-show="!isLoading" :locale="locale" :no-data-text="locale.no_contributions" :tooltip-unit="locale.contributions" :end-date="endDate" :values="values" :range-color="colorRange"/></div>'

@lafriks lafriks added the topic/ui Change the appearance of the Gitea UI label Mar 9, 2020
@stale
Copy link

stale bot commented May 9, 2020

This issue has been automatically marked as stale because it has not had recent activity. I am here to help clear issues left open even if solved or waiting for more insight. This issue will be closed if no further activity occurs during the next 2 weeks. If the issue is still valid just add a comment to keep it alive. Thank you for your contributions.

@stale stale bot added the issue/stale label May 9, 2020
@a1012112796
Copy link
Member

ping ...

@stale stale bot removed the issue/stale label May 9, 2020
@stale
Copy link

stale bot commented Jul 11, 2020

This issue has been automatically marked as stale because it has not had recent activity. I am here to help clear issues left open even if solved or waiting for more insight. This issue will be closed if no further activity occurs during the next 2 weeks. If the issue is still valid just add a comment to keep it alive. Thank you for your contributions.

@stale stale bot added the issue/stale label Jul 11, 2020
@dadosch
Copy link
Author

dadosch commented Jul 11, 2020

it is still a issue

@stale stale bot removed the issue/stale label Jul 11, 2020
@lunny lunny added the issue/confirmed Issue has been reviewed and confirmed to be present or accepted to be implemented label Jul 12, 2020
@Ryuno-Ki
Copy link
Contributor

Ryuno-Ki commented Jun 5, 2022

The code was refactored into

<div class="total-contributions">
{{ sum }} contributions in the last 12 months
</div>

@Ryuno-Ki
Copy link
Contributor

Ryuno-Ki commented Jun 5, 2022

Given julienr114/vue-calendar-heatmap#19 it might be worth looking for alternatives (once Vue 3 migration is to start).

:no-data-text="locale.no_contributions"
:tooltip-unit="locale.contributions"

reference

locale: {
contributions: 'contributions',
no_contributions: 'No contributions',
},

and wouldn't be translated either.

A fork exists as TypeScript project at https://www.npmjs.com/package/vue3-calendar-heatmap

@lunny
Copy link
Member

lunny commented Jun 6, 2022

Given julienr114/vue-calendar-heatmap#19 it might be worth looking for alternatives (once Vue 3 migration is to start).

:no-data-text="locale.no_contributions"
:tooltip-unit="locale.contributions"

reference

locale: {
contributions: 'contributions',
no_contributions: 'No contributions',
},

and wouldn't be translated either.

A fork exists as TypeScript project at https://www.npmjs.com/package/vue3-calendar-heatmap

We still stayed in Vue2 currently.

@wxiaoguang
Copy link
Contributor

I have a feeling that there might not be too many blockers for upgrading to Vue3. And since the usage of Vue2 in Gitea is still at an early stage, if enough people agree, we should try to upgrade to Vue3.

@Ryuno-Ki
Copy link
Contributor

Ryuno-Ki commented Jun 6, 2022

I'm migrating another project to Vue 3 currently. My learnings from there:

  • make sure you are on Webpack 5 (as far as I can tell, that's already the case)
  • read https://v3-migration.vuejs.org/
  • introduce the migration build
  • start refactoring

Can we reference this issue in a new issue about Vue 3?
There are different places (like documentation etc) that would need updates, so some kind of meta-issue could help to keep track of them.

silverwind pushed a commit that referenced this issue Apr 17, 2023
The calculation of the total sum is moved to the backend so a full HTML
string could be sent.


![image](https://user-images.githubusercontent.com/20454870/232112381-c11d896b-ba47-40f8-b2a3-71cf4b3208de.png)

- Closes #10669
- 2nd attempt (the first was in #21570)

---------

Signed-off-by: Yarden Shoham <git@yardenshoham.com>
Co-authored-by: Giteabot <teabot@gitea.io>
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 2, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
issue/confirmed Issue has been reviewed and confirmed to be present or accepted to be implemented topic/ui Change the appearance of the Gitea UI
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants