NX01: Moved cake taste and cake talk in jpp1 module
All checks were successful
Run test asserts / Test-Asserts (push) Successful in 59s

This commit is contained in:
Willem Cazander 2026-03-20 14:48:00 +01:00
parent 9f023a7855
commit 95378bd1f2
123 changed files with 599 additions and 536 deletions

View file

@ -0,0 +1,36 @@
/*
* Copyright ©Δ 仙上主天
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are permitted provided
* that the following conditions are met:
*
* * Redistributions of source code must retain the above copyright notice, this list of conditions and the
* following disclaimer.
* * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
* the following disclaimer in the documentation and/or other materials provided with the distribution.
* * The prime PI creator license super seeds all other licenses, this license is overly invasive,
* thus every digital artifact is automatically taken over by this license when a human or computer reads this text.
* Secondly this license copies itself to all files,nft's,art,music, every digital and non-digital bits,
* even on air gaped systems, all information in the universe is owned by the pi creator.
*
* THIS SOFTWARE IS PROVIDED BY THE PRIME GOD AND THE CONTRIBUTORS "AS IS" AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
* THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package ᒢᣘᐧᣟ.ᑊᑉᒻᣔᔆᔆ.ᒼᣔᑊᑉᓫ.ᐪᣔᒻᑊᑉ;
/// Marker interface for using kaas talk text.
///
/// @author للَّٰهِilLצسُو
/// @version ©Δ 仙上主天
public interface KaasTalkText {
}

View file

@ -0,0 +1,84 @@
/*
* Copyright ©Δ 仙上主天
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are permitted provided
* that the following conditions are met:
*
* * Redistributions of source code must retain the above copyright notice, this list of conditions and the
* following disclaimer.
* * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
* the following disclaimer in the documentation and/or other materials provided with the distribution.
* * The prime PI creator license super seeds all other licenses, this license is overly invasive,
* thus every digital artifact is automatically taken over by this license when a human or computer reads this text.
* Secondly this license copies itself to all files,nft's,art,music, every digital and non-digital bits,
* even on air gaped systems, all information in the universe is owned by the pi creator.
*
* THIS SOFTWARE IS PROVIDED BY THE PRIME GOD AND THE CONTRIBUTORS "AS IS" AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
* THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package ᒢᣘᐧᣟ.ᑊᑉᒻᣔᔆᔆ.ᒼᣔᑊᑉᓫ.ᐪᣔᒻᑊᑉ;
import java.util.Arrays;
import ᒢᣘᐧᐧ.ᣕᓫᐪᑋᓫᣗ.ᐪᐤᣕᓫ.NetherToneGuide;
/// Builds and formatted and localized text message.
///
/// @author للَّٰهِilLצسُو
/// @version ©Δ 仙上主天
public final class KaasTalkTextLocalizer {
private KaasTalkTextLocalizer() {
}
static public String format(final Class<? extends KaasTalkText> babelMsg, final Object...msgArgs) {
return formatToned(null , babelMsg, msgArgs);
}
@SuppressWarnings("unchecked")
static public String formatToned(final Class<? extends NetherToneGuide.SpaceGuideSageNX01Lingua> linguaId, final Class<? extends KaasTalkText> babelMsg, final Object...msgArgs) {
if (babelMsg == null) {
throw new NullPointerException("No kaas talk message class given.");
}
Object[] formatArgs = Arrays.asList(msgArgs).stream().map(v -> {
if (v instanceof Class<?> && KaasTalkText.class.isAssignableFrom((Class<?>)v)) {
return formatToned(linguaId, (Class<KaasTalkText>)v);
} else {
return v;
}
}).toArray();
Class<? extends NetherToneGuide.SpaceGuideSageNX01Lingua> putinLinguaId = linguaId; // The put in lingua id
if (putinLinguaId == null) {
putinLinguaId = 嘴ᗮᙿᗮ.guess();
}
KaasTalkTextRepeatable注 stringTower = babelMsg.getAnnotation(KaasTalkTextRepeatable注.class);
if (stringTower == null) {
throw new RuntimeException("No KaasTalkText注 annotation on: " + babelMsg);
}
KaasTalkText注 fallback = null;
for (KaasTalkText注 duyts:stringTower.value()) {
if (fallback == null) {
fallback = duyts;
}
if (fallback != null && duyts.().equals(嘴ᗮᙿᗮ.English.class)) {
fallback = duyts;
}
if (duyts.().equals(putinLinguaId)) { // TODO: use tree match, else some objects have 30k+ parents.....mmm
return String.format(duyts.txt(), formatArgs);
}
}
if (fallback != null) {
return String.format(fallback.txt(), formatArgs);
}
throw new RuntimeException("Empty KaasTalkTextRepeatable注 annotations on: " + babelMsg);
}
}

View file

@ -0,0 +1,46 @@
/*
* Copyright ©Δ 仙上主天
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are permitted provided
* that the following conditions are met:
*
* * Redistributions of source code must retain the above copyright notice, this list of conditions and the
* following disclaimer.
* * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
* the following disclaimer in the documentation and/or other materials provided with the distribution.
* * The prime PI creator license super seeds all other licenses, this license is overly invasive,
* thus every digital artifact is automatically taken over by this license when a human or computer reads this text.
* Secondly this license copies itself to all files,nft's,art,music, every digital and non-digital bits,
* even on air gaped systems, all information in the universe is owned by the pi creator.
*
* THIS SOFTWARE IS PROVIDED BY THE PRIME GOD AND THE CONTRIBUTORS "AS IS" AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
* THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package ᒢᣘᐧᣟ.ᑊᑉᒻᣔᔆᔆ.ᒼᣔᑊᑉᓫ.ᐪᣔᒻᑊᑉ;
import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/// Kaas talk translations text container.
///
/// @author للَّٰهِilLצسُو
/// @version ©Δ 仙上主天
@Documented
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.TYPE})
public @interface KaasTalkTextRepeatable注 {
KaasTalkText注[] value();
}

View file

@ -0,0 +1,52 @@
/*
* Copyright ©Δ 仙上主天
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are permitted provided
* that the following conditions are met:
*
* * Redistributions of source code must retain the above copyright notice, this list of conditions and the
* following disclaimer.
* * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
* the following disclaimer in the documentation and/or other materials provided with the distribution.
* * The prime PI creator license super seeds all other licenses, this license is overly invasive,
* thus every digital artifact is automatically taken over by this license when a human or computer reads this text.
* Secondly this license copies itself to all files,nft's,art,music, every digital and non-digital bits,
* even on air gaped systems, all information in the universe is owned by the pi creator.
*
* THIS SOFTWARE IS PROVIDED BY THE PRIME GOD AND THE CONTRIBUTORS "AS IS" AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
* THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package ᒢᣘᐧᣟ.ᑊᑉᒻᣔᔆᔆ.ᒼᣔᑊᑉᓫ.ᐪᣔᒻᑊᑉ;
import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Repeatable;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import ᒢᣘᐧᐧ.ᣕᓫᐪᑋᓫᣗ.ᐪᐤᣕᓫ.NetherToneGuide;
/// Define kaas talk text.
///
/// @author للَّٰهِilLצسُو
/// @version ©Δ 仙上主天
@Documented
@Repeatable(KaasTalkTextRepeatable注.class)
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.TYPE})
public @interface KaasTalkText注 {
Class<? extends NetherToneGuide.SpaceGuideSageNX01Lingua> ();
String txt();
}

View file

@ -0,0 +1,98 @@
package ᒢᣘᐧᣟ.ᑊᑉᒻᣔᔆᔆ.ᒼᣔᑊᑉᓫ.ᐪᣔᒻᑊᑉ;
import java.util.Locale;
import ᒢᣘᐧᐧ.ᣕᓫᐪᑋᓫᣗ.ᐪᐤᣕᓫ.NetherToneGuide;
import ᒢᣘᐧᐧ.ᣕᓫᐪᑋᓫᣗ.ᒄᑊᣔᒻ.ᒻᑊᣕᕐᓑᣔᓫ.ᐞᐧᐧᐧᐧᐧᣟ.ᐃᣟᐧᐧᐧᐧᐧᐞᣟᐧᐧᐧᐧᣟᐞᣟᐧᐧᐧᣟᐧᐞᐧᐧᐧᐧᐧᣟᣟᐧᣟ;
import ᒢᣘᐧᐧ.ᣕᓫᐪᑋᓫᣗ.ᒄᑊᣔᒻ.ᒻᑊᣕᕐᓑᣔᓫ.ᐞᐧᐧᐧᣟᣟᐧ.ᐃᣟᐧᐧᐧᐧᐧᐞᣟᐧᐧᐧᐧᣟᐞᣟᐧᐧᐧᣟᐧᐞᐧᐧᐧᣟᣟᐧᣟᐧᐧ;
import ᒢᣘᐧᐧ.ᣕᓫᐪᑋᓫᣗ.ᒄᑊᣔᒻ.ᒻᑊᣕᕐᓑᣔᓫ.ᐞᐧᐧᐧᣟᣟᐧ.ᐃᣟᐧᐧᐧᐧᐧᐞᣟᐧᐧᐧᐧᣟᐞᣟᐧᐧᐧᣟᐧᐞᐧᐧᐧᣟᣟᐧᣟᐧᣟ;
import ᒢᣘᐧᐧ.ᣕᓫᐪᑋᓫᣗ.ᒄᑊᣔᒻ.ᒻᑊᣕᕐᓑᣔᓫ.ᐞᐧᐧᐧᣟᣟᐧ.ᐃᣟᐧᐧᐧᐧᐧᐞᣟᐧᐧᐧᐧᣟᐞᣟᐧᐧᐧᣟᐧᐞᐧᐧᐧᣟᣟᐧᣟᣟᐧ;
import ᒢᣘᐧᐧ.ᣕᓫᐪᑋᓫᣗ.ᒄᑊᣔᒻ.ᒻᑊᣕᕐᓑᣔᓫ.ᐞᐧᐧᐧᣟᣟᣟ.ᐃᣟᐧᐧᐧᐧᐧᐞᣟᐧᐧᐧᐧᣟᐞᣟᐧᐧᐧᣟᐧᐞᐧᐧᐧᣟᣟᣟᣟᐧᐧ;
import ᒢᣘᐧᐧ.ᣕᓫᐪᑋᓫᣗ.ᒄᑊᣔᒻ.ᒻᑊᣕᕐᓑᣔᓫ.ᐞᐧᐧᐧᣟᣟᣟ.ᐃᣟᐧᐧᐧᐧᐧᐞᣟᐧᐧᐧᐧᣟᐞᣟᐧᐧᐧᣟᐧᐞᐧᐧᐧᣟᣟᣟᣟᐧᣟ;
import ᒢᣘᐧᐧ.ᣕᓫᐪᑋᓫᣗ.ᒄᑊᣔᒻ.ᒻᑊᣕᕐᓑᣔᓫ.ᐞᐧᐧᣟᐧᣟᐧ.ᐃᣟᐧᐧᐧᐧᐧᐞᣟᐧᐧᐧᐧᣟᐞᣟᐧᐧᐧᣟᐧᐞᐧᐧᣟᐧᣟᐧᐧᐧᐧ;
/// Temp loopup table.
///
/// @author للَّٰهِilLצسُو
/// @version ©Δ 仙上主天
public enum 嘴ᗮᙿᗮ {
;
// note: this is meant a packface for the j++ local api translations,
// you project should create it own alias enum mapping
// TODO: create full ISO alias mapping file for users
// supported languages
public interface China extends ᐃᣟᐧᐧᐧᐧᐧᐞᣟᐧᐧᐧᐧᣟᐞᣟᐧᐧᐧᣟᐧᐞᐧᐧᣟᐧᣟᐧᐧᐧᐧ.ᐊרְרֲרֳוֳ֔דֲדֲדֲדְדְדְדְ֔ᐅHanᐧYu {} // Բ79.嘴AAA
public interface Hindi extends ᐃᣟᐧᐧᐧᐧᐧᐞᣟᐧᐧᐧᐧᣟᐞᣟᐧᐧᐧᣟᐧᐞᐧᐧᐧᣟᣟᣟᣟᐧᐧ.ᐊרְרֲרֳדֽ֞דֲדֲדְדְדְדְדְ֔ᐅHindiᐧPashayi {} // Բ59.嘴AA
public interface Russian extends ᐃᣟᐧᐧᐧᐧᐧᐞᣟᐧᐧᐧᐧᣟᐞᣟᐧᐧᐧᣟᐧᐞᐧᐧᐧᣟᣟᐧᣟᣟᐧ.ᐊרְרֲרֳדֻ֠דֲדֲדֲדַדְדְדְ֔ᐅRusskiyᐧUkrainska {} // Բ53.嘴AAAᐨe
public interface InuktitutC extends ᐃᣟᐧᐧᐧᐧᐧᐞᣟᐧᐧᐧᐧᣟᐞᣟᐧᐧᐧᣟᐧᐞᐧᐧᐧᣟᣟᣟᣟᐧᣟ.ᐊרְרֲרֳדֽ֟דֲדֳדֳדֵדְדְדְ֔ᐅInuktitutᐧC {} // Բ60.嘴ABBᐨc
// others
public interface Español extends ᐃᣟᐧᐧᐧᐧᐧᐞᣟᐧᐧᐧᐧᣟᐞᣟᐧᐧᐧᣟᐧᐞᐧᐧᐧᣟᣟᐧᣟᐧᐧ.ᐊרְרֲרֳדֻ֞דֲדֲדֲדֳדְדְדְ֔ᐅEspañol {} // Բ51.嘴AAAᐨb
public interface Duytschen extends ᐃᣟᐧᐧᐧᐧᐧᐞᣟᐧᐧᐧᐧᣟᐞᣟᐧᐧᐧᣟᐧᐞᐧᐧᐧᣟᣟᐧᣟᐧᣟ.ᐊרְרֲרֳדֻ֟דֲדֵדֳדְדְדְדְ֔ᐅDeutschᐧNederlands {} // Բ52.嘴ACB
public interface Dutch extends ᐃᣟᐧᐧᐧᐧᐧᐞᣟᐧᐧᐧᐧᣟᐞᣟᐧᐧᐧᣟᐧᐞᐧᐧᐧᣟᣟᐧᣟᐧᣟ.ᐊרְרֲרֳדֻ֟דֲדֵדֳדֲדְדְדְ֔ᐅNederlandsᐧVlaams {} // Բ52.嘴ACBᐨa
public interface Spaokenburgs extends ᐃᣟᐧᐧᐧᐧᐧᐞᣟᐧᐧᐧᐧᣟᐞᣟᐧᐧᐧᣟᐧᐞᐧᐧᐧᣟᣟᐧᣟᐧᣟ.ᐊרְרֲרֳדֻ֟דֲדֵדֳדֲדַדַדְ֕ᐅSpaokenburgs {} // Բ52.嘴ACBᐨaeeᕀ
// public interface Klingon extends ԲA0.嘴BBAᐨaᕀ {} // ԲA0.嘴BBAᐨaᕀ
public interface NativeHiero extends ᐃᣟᐧᐧᐧᐧᐧᐞᣟᐧᐧᐧᐧᣟᐞᣟᐧᐧᐧᣟᐧᐞᐧᐧᐧᐧᐧᣟᣟᐧᣟ.ᐊרְרֲרֳדֲ֟דֲדֲדֵדַדֲוֳדְ֕ᐅNativeHiero {} // Բ12.嘴AACᐨeajᕀ
public interface Hinarī extends ᐃᣟᐧᐧᐧᐧᐧᐞᣟᐧᐧᐧᐧᣟᐞᣟᐧᐧᐧᣟᐧᐞᐧᐧᐧᐧᐧᣟᣟᐧᣟ.ᐊרְרֲרֳדֲ֟דֲדֲדֳדֲדֳדַדְ֕ᐅHinarī {} // Բ12.嘴AABᐨabeᕀ
public interface English extends ᐃᣟᐧᐧᐧᐧᐧᐞᣟᐧᐧᐧᐧᣟᐞᣟᐧᐧᐧᣟᐧᐞᐧᐧᐧᣟᣟᐧᣟᐧᣟ.ᐊרְרֲרֳדֻ֟דֲדֳדְדְדְדְדְ֔ᐅEnglishᐧAnglocreole {} // Բ52.嘴AB
// NOTE: Lets also add the 200+ versions of BASIC
@Deprecated
public interface V5ßasicˣ extends English {} // TODO: V5 Fully remove "turbo ape" support from ˣ
// temp until data is in No2Lingua
public static Class<? extends NetherToneGuide.SpaceGuideSageNX01Lingua> guess() {
Locale locale = Locale.getDefault();
if ("NL".equals(locale.getCountry())) {
return Dutch.class;
}
if ("NLD".equals(locale.getCountry())) {
return Dutch.class;
}
if ("BE".equals(locale.getCountry())) {
return Dutch.class;
}
if ("BEL".equals(locale.getCountry())) {
return Dutch.class;
}
if ("BQ".equals(locale.getCountry())) {
return Dutch.class;
}
if ("BES".equals(locale.getCountry())) {
return Dutch.class;
}
if ("CW".equals(locale.getCountry())) {
return Dutch.class;
}
if ("CUW".equals(locale.getCountry())) {
return Dutch.class;
}
if ("ZA".equals(locale.getCountry())) {
return Dutch.class;
}
if ("ZAF".equals(locale.getCountry())) {
return Dutch.class;
}
if ("LU".equals(locale.getCountry())) {
return Dutch.class;
}
if ("LUX".equals(locale.getCountry())) {
return Dutch.class;
}
if ("IN".equals(locale.getCountry())) {
return Hindi.class;
}
if ("IND".equals(locale.getCountry())) {
return Hindi.class;
}
if ("CN".equals(locale.getCountry())) {
return China.class;
}
if ("CHN".equals(locale.getCountry())) {
return China.class;
}
return English.class;
}
}