Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 059f3fc

Browse files
committedMar 4, 2025·
impl: support for Toolbox 2.6.0.38881 (2)
- initial support for localization which is now mandatory
1 parent 99e56cf commit 059f3fc

File tree

3 files changed

+26
-2
lines changed

3 files changed

+26
-2
lines changed
 

‎build.gradle.kts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ plugins {
1919
alias(libs.plugins.ksp)
2020
alias(libs.plugins.gradle.wrapper)
2121
alias(libs.plugins.changelog)
22+
alias(libs.plugins.gettext)
2223
}
2324

2425

@@ -215,6 +216,11 @@ val publishPlugin by tasks.creating {
215216

216217
fun properties(key: String) = project.findProperty(key).toString()
217218

219+
gettext {
220+
potFile = project.layout.projectDirectory.file("src/main/resources/localization/defaultMessages.pot")
221+
keywords = listOf("ptrc:1c,2", "ptrl")
222+
}
223+
218224
// region will be moved to the gradle plugin late
219225
data class ExtensionJsonMeta(
220226
val name: String,
@@ -245,5 +251,4 @@ fun generateExtensionJson(extensionJson: ExtensionJson, destinationFile: Path) {
245251
destinationFile.parent.createDirectories()
246252
destinationFile.writeText(extensionJson)
247253
}
248-
249254
// endregion

‎gradle/libs.versions.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ moshi = "1.15.1"
1313
ksp = "2.1.0-1.0.29"
1414
retrofit = "2.8.2"
1515
changelog = "2.2.1"
16+
gettext = "0.7.0"
1617
plugin-structure = "3.298"
1718

1819
[libraries]
@@ -44,4 +45,5 @@ serialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref
4445
dependency-license-report = { id = "com.github.jk1.dependency-license-report", version.ref = "dependency-license-report" }
4546
ksp = { id = "com.google.devtools.ksp", version.ref = "ksp" }
4647
gradle-wrapper = { id = "me.filippov.gradle.jvm.wrapper", version.ref = "gradle-wrapper" }
47-
changelog = { id = "org.jetbrains.changelog", version.ref = "changelog" }
48+
changelog = { id = "org.jetbrains.changelog", version.ref = "changelog" }
49+
gettext = { id = "name.kropp.kotlinx-gettext", version.ref = "gettext" }
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# SOME DESCRIPTIVE TITLE.
2+
# Copyright (C) 2025 THE PACKAGE'S COPYRIGHT HOLDER
3+
# This file is distributed under the same license as the PACKAGE package.
4+
# Ioan Faur <fioan89@gmail.com>, 2025.
5+
#
6+
#, fuzzy
7+
msgid ""
8+
msgstr ""
9+
"Project-Id-Version: Coder Toolbox 1.0\n"
10+
"Report-Msgid-Bugs-To: support@coder.com\n"
11+
"POT-Creation-Date: 2025-03-04 12:00+0000\n"
12+
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
13+
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
14+
"Language-Team: LANGUAGE <LL@li.org>\n"
15+
"MIME-Version: 1.0\n"
16+
"Content-Type: text/plain; charset=UTF-8\n"
17+
"Content-Transfer-Encoding: 8bit\n"

0 commit comments

Comments
 (0)
Please sign in to comment.