Skip to content

Commit

Permalink
Merge pull request #18 from RappyLabyAddons/feat/accentTranslations
Browse files Browse the repository at this point in the history
Support accent translations
  • Loading branch information
RappyTV authored Dec 21, 2023
2 parents 9df63a1 + a5205a4 commit c40af70
Show file tree
Hide file tree
Showing 6 changed files with 52 additions and 6 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/accent.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Accent sync

on:
schedule:
- cron: "0 */12 * * *"
workflow_dispatch:

env:
ACCENT_API_KEY: ${{ secrets.ACCENT_TOKEN }}

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
- run: npm install -g accent-cli
- run: accent sync --add-translations --merge-type=passive --order-by=key
- uses: peter-evans/create-pull-request@v4
with:
branch: accent
title: New translations are available to merge
body: Translation files have been updated, feel free to merge this pull request after review.
add-paths: "core/src/main/resources/assets/deathfinder/i18n/*.json"
commit-message: Update Accent
committer: GitHub <noreply@github.com>
author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>
draft: false
delete-branch: true
assignees: RappyTV
labels: translations
11 changes: 11 additions & 0 deletions accent.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"apiUrl": "https://translate.rappytv.com",
"files": [
{
"namePattern": "parentDirectory",
"format": "json",
"source": "core/src/main/resources/assets/eshare/i18n/%slug%.json",
"target": "core/src/main/resources/assets/eshare/i18n/%slug%.json"
}
]
}
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ labyMod {
author = "RappyTV"
description = "This addon saves your last death point, so you can find your items again."
minecraftVersion = "1.8<1.20.4"
version = System.getenv().getOrDefault("VERSION", "1.0.6")
version = System.getenv().getOrDefault("VERSION", "1.0.7")
}

minecraft {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public void onDeath(DeathEvent event) {
.text("[", NamedTextColor.DARK_GRAY)
.append(Component.text("TP", Style.builder().color(NamedTextColor.RED).decorate(TextDecoration.BOLD).build()))
.append(Component.text("]", NamedTextColor.DARK_GRAY))
.hoverEvent(HoverEvent.showText(Component.translatable("deathfinder.messages.clickToTeleport", NamedTextColor.GREEN)))
.hoverEvent(HoverEvent.showText(Component.translatable("deathfinder.hover.teleport", NamedTextColor.GREEN)))
.clickEvent(ClickEvent.runCommand("/back"))
);
if(backCommand && coordsCommand) interactable.append(Component.text(" | ", NamedTextColor.DARK_GRAY));
Expand All @@ -48,7 +48,7 @@ public void onDeath(DeathEvent event) {
.text("[", NamedTextColor.DARK_GRAY)
.append(Component.text("INFOS", Style.builder().color(NamedTextColor.AQUA).decorate(TextDecoration.BOLD).build()))
.append(Component.text("]", NamedTextColor.DARK_GRAY))
.hoverEvent(HoverEvent.showText(Component.translatable("deathfinder.messages.clickToShow", NamedTextColor.GREEN)))
.hoverEvent(HoverEvent.showText(Component.translatable("deathfinder.hover.show", NamedTextColor.GREEN)))
.clickEvent(ClickEvent.runCommand("/coords"))
);
Util.msg(info, interactable);
Expand Down
6 changes: 4 additions & 2 deletions core/src/main/resources/assets/deathfinder/i18n/en_us.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,12 @@
},
"messages": {
"savedPoint": "Your death point was saved!",
"clickToTeleport": "Click to teleport to coordinates!",
"clickToShow": "Click to show coordinates",
"noSavedPoint": "There is no death point saved!",
"deathPoint": "Those are your death coordinates:"
},
"hover": {
"teleport": "Click to teleport to coordinates!",
"show": "Click to show coordinates"
}
}
}
2 changes: 1 addition & 1 deletion settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
rootProject.name = "deathfinder"

pluginManagement {
val labyGradlePluginVersion = "0.3.38"
val labyGradlePluginVersion = "0.3.40"
plugins {
id("net.labymod.gradle") version (labyGradlePluginVersion)
}
Expand Down

0 comments on commit c40af70

Please sign in to comment.