From 1af43607401ff34d9f5c82d645e021d313280376 Mon Sep 17 00:00:00 2001 From: romnzs Date: Thu, 28 Oct 2021 00:12:31 +0300 Subject: [PATCH] Use relevant title for unlike study button --- app/views/study/jsI18n.scala | 1 + modules/i18n/src/main/I18nKeys.scala | 1 + translation/source/study.xml | 1 + ui/analyse/src/study/studyView.ts | 2 +- 4 files changed, 4 insertions(+), 1 deletion(-) diff --git a/app/views/study/jsI18n.scala b/app/views/study/jsI18n.scala index da7f8a4511..fb7431acf7 100644 --- a/app/views/study/jsI18n.scala +++ b/app/views/study/jsI18n.scala @@ -35,6 +35,7 @@ object jsI18n { youAreNowASpectator, pgnTags, like, + unlike, newTag, commentThisPosition, commentThisMove, diff --git a/modules/i18n/src/main/I18nKeys.scala b/modules/i18n/src/main/I18nKeys.scala index f172271d16..ebba4ebc72 100644 --- a/modules/i18n/src/main/I18nKeys.scala +++ b/modules/i18n/src/main/I18nKeys.scala @@ -1067,6 +1067,7 @@ val `youAreNowAContributor` = new I18nKey("study:youAreNowAContributor") val `youAreNowASpectator` = new I18nKey("study:youAreNowASpectator") val `pgnTags` = new I18nKey("study:pgnTags") val `like` = new I18nKey("study:like") +val `unlike` = new I18nKey("study:unlike") val `newTag` = new I18nKey("study:newTag") val `commentThisPosition` = new I18nKey("study:commentThisPosition") val `commentThisMove` = new I18nKey("study:commentThisMove") diff --git a/translation/source/study.xml b/translation/source/study.xml index 0142191ad4..508d4d805a 100644 --- a/translation/source/study.xml +++ b/translation/source/study.xml @@ -41,6 +41,7 @@ You are now a spectator PGN tags Like + Unlike New tag Comment on this position Comment on this move diff --git a/ui/analyse/src/study/studyView.ts b/ui/analyse/src/study/studyView.ts index 73441996da..8c953d4081 100644 --- a/ui/analyse/src/study/studyView.ts +++ b/ui/analyse/src/study/studyView.ts @@ -151,7 +151,7 @@ function metadata(ctrl: StudyCtrl): VNode { class: { liked: d.liked }, attrs: { 'data-icon': d.liked ? '' : '', - title: ctrl.trans.noarg('like'), + title: ctrl.trans.noarg(d.liked ? 'unlike' : 'like'), }, hook: bind('click', ctrl.toggleLike), },