Code Monkey home page Code Monkey logo

langswitch's People

Contributors

dosmike avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

langswitch's Issues

Translations

Is there a command that creates a template available for translations values?

Missing translations in default en_US

Console has been reporting that I am missing translations, for example:

03.06 12:27:37 [Server] Server thread/INFO [langswitch]: Missing translation shop.title
03.06 12:27:38 [Server] Server thread/INFO [langswitch]: Missing translation shop.item.buy.one
03.06 12:27:38 [Server] Server thread/INFO [langswitch]: Missing translation shop.item.buy.one
03.06 12:27:38 [Server] Server thread/INFO [langswitch]: Missing translation shop.item.sell.one
03.06 12:27:38 [Server] Server thread/INFO [langswitch]: Missing translation shop.item.sell.one
03.06 12:27:40 [Server] Server thread/INFO [langswitch]: Missing translation shop.sell.message
03.06 12:27:42 [Server] Server thread/INFO [langswitch]: Missing translation shop.buy.message
03.06 12:27:48 [Server] Server thread/INFO [nucleus]: Senidy ran the command: /vshop delete
03.06 12:27:48 [Server] Server thread/INFO [langswitch]: Missing translation cmd.deleted

However, I am using the default en_US in the config, which I think should work. As a result, I'm just getting generic messages in response to everything. Also, regardless of whether I buy or sell it says "[items bought]" in white in the game chat.

The LangSwitch config looks like this (apologies for the text formatting but the hashtag symbol automatically makes it giant and I'm not sure how to stop it from doing that):

# This is the default fallback language for the server. If a translation is missing this language will be used, so make sure that the translations for this language are complete.
DefaultLocale="en_US"
# Verbose logging will inform you about any missing or broken translations. It is recommended that you boot up with this enabled at least once after updates, to get a quick glimpse if everything is ok.
VerboseLogging=true ```

Null-Pointer Exception in /vshop identify

Stacktrace from calling /vshop id

06.12 18:16:23 [Server] Server thread/ERROR [Sponge]: Error occurred while executing command 'vshop id' for source EntityPlayerMP['PeexGaming'/35468, l='Ogtes Squad', x=-296.99, y=68.00, z=544.38]: null
06.12 18:16:23 [Server] INFO java.util.NoSuchElementException: null
06.12 18:16:23 [Server] INFO at java.util.LinkedList.getLast(LinkedList.java:257) ~[?:1.8.0_191]
06.12 18:16:23 [Server] INFO at de.dosmike.sponge.spannable.Spannable.toText(Spannable.java:905) ~[Spannable.class:1.6]
06.12 18:16:23 [Server] INFO at de.dosmike.sponge.langswitch.LocalizedText.getLocal(LocalizedText.java:61) ~[LocalizedText.class:1.6]
06.12 18:16:23 [Server] INFO at de.dosmike.sponge.langswitch.LocalizedText.lambda$resolve$1(LocalizedText.java:96) ~[LocalizedText.class:1.6]
06.12 18:16:23 [Server] INFO at java.util.Optional.map(Optional.java:215) ~[?:1.8.0_191]
06.12 18:16:23 [Server] INFO at de.dosmike.sponge.langswitch.LocalizedText.resolve(LocalizedText.java:96) ~[LocalizedText.class:1.6]
06.12 18:16:23 [Server] INFO at de.dosmike.sponge.langswitch.LocalizedText.resolve(LocalizedText.java:91) ~[LocalizedText.class:1.6]
06.12 18:16:23 [Server] INFO at de.dosmike.sponge.langswitch.LocalizedText.resolve(LocalizedText.java:81) ~[LocalizedText.class:1.6]
06.12 18:16:23 [Server] INFO at de.dosmike.sponge.vshop.CommandRegistra.lambda$register$9(CommandRegistra.java:574) ~[CommandRegistra.class:2.2.2]

more...
spongeforge-1.12.2-2825-7.1.6
VillagerShops-2.2.2
LangSwitch-1.6

Not everything is translated. Strange log. Spam in console.

\config\langswitch.conf

# Servers fallback locale
DefaultLocale=ru_RU

ru_RU.lang

start server

[01:16:14] [Server thread/INFO] [langswitch]: Setting default locale to ru_RU
[01:16:14] [Server thread/INFO] [langswitch]: The LanguageService is now available!

connect client

[01:21:06] [Server thread/INFO]: ziceptor[/192.168.***.***:***] logged in with entity id 148 in custom(2) at (-239.85415472615256, 71.0, 30.14508611304827)
[01:21:06] [pool-3-thread-12/INFO] [langswitch]: Loading translations for vshop in en_US...

click item in shop -> spam in console

[01:26:24] [Server thread/INFO] [langswitch]: Missing translation shop.title[en_US]
[01:26:24] [Server thread/INFO] [langswitch]: Missing translation shop.item.buy.one[en_US]
[01:26:24] [Server thread/INFO] [langswitch]: Missing translation shop.item.sell.one[en_US]
[01:26:24] [Server thread/INFO] [langswitch]: Missing translation shop.item.buy.one[en_US]
[01:26:24] [Server thread/INFO] [langswitch]: Missing translation shop.item.sell.one[en_US]
[01:26:24] [Server thread/INFO] [langswitch]: Missing translation shop.item.buy.one[en_US]
[01:26:24] [Server thread/INFO] [langswitch]: Missing translation shop.item.sell.one[en_US]
[01:26:24] [Server thread/INFO] [langswitch]: Missing translation shop.item.buy.one[en_US]
[01:26:24] [Server thread/INFO] [langswitch]: Missing translation shop.item.sell.one[en_US]
[01:26:24] [Server thread/INFO] [langswitch]: Missing translation shop.item.buy.one[en_US]
[01:26:24] [Server thread/INFO] [langswitch]: Missing translation shop.item.sell.one[en_US]
[01:26:24] [Server thread/INFO] [langswitch]: Missing translation shop.item.buy.one[en_US]
[01:26:24] [Server thread/INFO] [langswitch]: Missing translation shop.item.sell.one[en_US]
[01:26:24] [Server thread/INFO] [langswitch]: Missing translation shop.item.buy.one[en_US]
[01:26:24] [Server thread/INFO] [langswitch]: Missing translation shop.item.sell.one[en_US]
[01:26:24] [Server thread/INFO] [langswitch]: Missing translation shop.item.buy.stack[en_US]
[01:26:24] [Server thread/INFO] [langswitch]: Missing translation shop.item.sell.stack[en_US]
[01:26:24] [Server thread/INFO] [langswitch]: Localisation shop.item.sell.stack does not use the following placeholder: %price%
[01:26:24] [Server thread/INFO] [langswitch]: Missing translation shop.item.buy.one[en_US]
[01:26:24] [Server thread/INFO] [langswitch]: Missing translation shop.item.sell.one[en_US]

item not translate
screenshot

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.