Skip to content

Commit

Permalink
more translatable gallery tooltips
Browse files Browse the repository at this point in the history
  • Loading branch information
3vorp committed Jul 5, 2024
1 parent 2a89f3a commit e06ee39
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 13 deletions.
18 changes: 12 additions & 6 deletions pages/gallery/gallery-tooltip.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,18 @@
</p>
</li>
<!-- mojang only means it's in vanilla, modded isn't technically mojang -->
<li v-else-if="modded"><v-icon small>mdi-wrench</v-icon> Modded Texture</li>
<li v-else-if="modded">
<v-icon small>mdi-wrench</v-icon> {{ $root.lang().gallery.tooltip.modded }}
</li>
<!-- ignored textures fall back to mojang-->
<li v-else-if="mojang"><i class="icon-mojang-red"></i> Mojang Studios</li>
<li v-else-if="ignored"><v-icon small>mdi-texture</v-icon> Ignored Texture</li>
<li v-else-if="mojang">
<i class="icon-mojang-red"></i> {{ $root.lang().gallery.tooltip.mojang }}
</li>
<li v-else-if="ignored">
<v-icon small>mdi-texture</v-icon> {{ $root.lang().gallery.tooltip.ignored }}
</li>
<li v-else>
{{ $root.lang("gallery.error_message.contribution_not_found") }}
{{ $root.lang().gallery.error_message.contribution_not_found }}
</li>
</ul>
</div>
Expand Down Expand Up @@ -62,7 +68,7 @@ export default {
ignoreList: {
type: Array,
required: true,
}
},
},
computed: {
lastContribution() {
Expand All @@ -86,7 +92,7 @@ export default {
},
ignored() {
return this.ignoreList.some((el) => this.texture.url.includes(el));
}
},
},
methods: {
timestampToDate(t) {
Expand Down
2 changes: 1 addition & 1 deletion pages/gallery/main.vue
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ export default {
// add all editions to ignore list
if (this.current.edition === "all")
ignoreList.push(
...settings.editions.map((edition) => this.ignoredTextures[edition]).flat(),
...settings.editions.map((edition) => this.ignoredTextures[edition.toLowerCase()]).flat(),
);
else ignoreList.push(...this.ignoredTextures[this.current.edition]);
return ignoreList;
Expand Down
7 changes: 1 addition & 6 deletions pages/review/review-preview.vue
Original file line number Diff line number Diff line change
Expand Up @@ -146,12 +146,7 @@
`${$root.lang().review.addon.labels.approved_by} ${getUsername(addonInPanel.approval.author)}`
}}
</div>
<div
v-if="
status === 'denied' ||
status === 'archived'
"
>
<div v-if="status === 'denied' || status === 'archived'">
<div>
{{
`${$root.lang().review.addon.labels.denied_by} ${getUsername(addonInPanel.approval.author)}:`
Expand Down
5 changes: 5 additions & 0 deletions resources/strings/en_US.js
Original file line number Diff line number Diff line change
Expand Up @@ -490,6 +490,11 @@ export default {
id_desc: "Texture ID (largest → smallest)",
contrib_desc: "Recently Contributed",
},
tooltip: {
modded: "Modded Texture",
mojang: "Mojang Studios",
ignored: "Ignored Texture",
},
all: "All",
latest: "Latest",
clear_cache: "Clear Gallery Cache",
Expand Down

0 comments on commit e06ee39

Please sign in to comment.