[mod] Empyrion Chat Auto Translate

Discussion in 'Empyrion API' started by ASTIC, Sep 23, 2018.

  1. ASTIC

    ASTIC Captain

    Joined:
    Dec 11, 2016
    Messages:
    991
    Likes Received:
    707
    Empyrion Chat Auto Translate

    Wo für ist das?
    Chatmeldungen können mit dieser Mod automatisch übersetzt werden. Dazu müssen fremdsprachige Spielern hinterlegt
    in welcher Spache sie kommunizieren z.B.
    /trans set en
    /trans set de
    /trans set it
    Meldungen dieser Spieler werden dann für alle anderen übersetzt und rechts oben in der Infobox angezeigt. Chatmeldungen anderer werden
    diesem Spieler in seiner Sprache in der Infobox rechts oben angezeigt.

    Wie steuert man den MOD?
    Die Kommandos funktionieren NUR im Fraktionschat! Die Übersetzung funktioniert sowohl im Globalen- als auch im Fraktionchat.

    Hilfe
    • /trans help : Zeigt die Kommandos der Mod an
    Übersetzungseinstellungen/Möglichkeiten
    • /trans set <language> => Sprache für den Spieler auf 'language' stellen z.B. de, en, it, ...
    • /trans help => Liste der Kommandos
    • /trans box <text> => Übersetzt den Text in den für den Spieler eingestellte Sprache und zeigt ihn an
    • /trans clear => Stellt die Sprache für den Spieler wirder auf die Serversprache zurück
    • /trans listall => Listet alle Spracheinstellungen auf (nur ab Moderator erlaubt)
    Beispiel (ServerMainLanguage: de -> Serversprache ist deutsch):
    • /trans set en
    Die Sprache wird gemäss ISO-639-1-Code angegeben https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes

    Wenn nun dieser Spieler etwas im Chat schreibt bekommen alle Empänger die eine andere Sprache eingestellt haben oder die (automatisc)
    noch auf Serversprache stehen automatisch einen Hinweis rechts oben mit dem übersetzten Text angezeigt.
    Wenn andere Spieler etwas schreiben, bekommt dieser Spieler das ab sofort die Nachichten in der englichen Übersetzung im
    Hinweisfenster angezeigt.

    Konfiguration
    Eine Konfiguration kann man in der Datei (wird beim ersten Start automatisch erstellt)
    [Empyrion Directory]\Saves\Games\[SaveGameName]\Mods\EmpyrionChatAutoTranslate\ChatAutoTranslatesDB.xml
    vornehmen.
    • ServerMainLanguage: Allgemeine Sprache für die meisen Spieler auf dem Server
    • DefaultSourceLanguage: Standardsprachkennung falls der Spieler keine Sprache eingestellt hat z.B. auto, de, en, ...
    • TranslateDelayTime: Verzögerung zwischen den Übersetzungsanforderungen
    • TranslateMinTextLength: Chat muss mindestes auch N Buchstaben bestehen
    • TranslateServiceUrl: URL für den Übersetzungsdienst
    • TanslateRespose: Übersetzung aus dem Ergebnis ermitteln
    • SupressTranslatePrefixes: Wenn die Chatmitteilung mit diesen Zeichen beginnt soll keine Übersetzung gestartet werden

    Was kommt noch?
    Zunächst erstmal und damit viel Spaß beim Verstehen wünscht euch
    ASTIC/TC

    Version 1.1.0:
    • Chatmeldungen werden im Standard jetzt mit "auto"->"Spielersprache oder Serversprache" übersetzt
    • Name des Spielers wird im Hinweistext rechts oben vor dem Text eingefügt.
    Version 1.2.0:
    • Chatmeldungen werden im mit dem farbig markierten Namen des Spielers versehen
    • BugFixes: /trans clear verweist nun nicht mehr auf die Hilfe ;-)
    • Verbesserung bei der Ergebnisextraktion: (Fehler: uno) hierfür muss entweder die XML Datei (ChatAutoTranslatesDB.xml) gelöscht werden oder der Eintrag "TanslateRespose" muss entfernt werden damit er neu eingefügt wird.
    Version 1.3.0:
    • Übersetzungsanfragen werden verzögert
    • Übersetzungen finden erst ab einer Mindestanzahl an Zeichen statt
    ***
    English-Version:
    ---

    What is it for?
    Chat messages can be translated automatically with this mod. For this foreign-language players must be deposited
    in which language they communicate, e.g.
    /trans set
    /trans set de
    /trans set it​
    Messages from these players will then be translated for everyone else and displayed in the upper right corner of the info box. Chat messages from others
    This player will be displayed in his language in the info box at the top right.

    How to control the MOD?
    The commands work ONLY in the fractional vote! The translation works in both global and faction chat.

    Help
    • /trans help: Displays the commands of the mod

    Translation Settings / Options
    • /trans set <language> => Set language for the player to 'language' e.g. de, en, it, ...
    • /trans help => list of commands
    • /trans box <text> => Translates the text into the language set for the player and displays it
    • /trans clear => Returns the language for the player to the server language
    • /trans listall => lists all language settings (only allowed from moderator)
    Example (ServerMainLanguage: DE -> server language is German):
    • /trans set
    The language is specified according to ISO-639-1 code https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes

    Now if this player writes something in the chat all recipients who have set a different language or (automatic)
    still on server language are automatically a note top right with the translated text displayed.
    If other players write something, this player gets the now in the English translation
    Note window is displayed.

    Configuration
    A configuration can be found in the file (automatically created on first startup)
    [Empyrion Directory]\Saves\Games\[SaveGameName]\Mods\EmpyrionChatAutoTranslate\ChatAutoTranslatesDB.xml
    make.
    • ServerMainLanguage: General language for most players on the server
    • DefaultSourceLanguage: default language identifier if the player has not set a language e.g. car, de, en, ...
    • TranslateMinTextLength: Chat must have N letter characters
    • TranslateDelayTime: Delay each translation request
    • TranslateDisplayTime: Length in seconds that the translation is displayed
    • TranslateServiceUrl: URL for the translation service
    • TanslateRespose: Find translation from the result
    • SupressTranslatePrefixes: If the chat message begins with these characters no translation should be started

    What else is coming?
    First of all, and have fun with understanding then wish you
    ASTIC / TC

    Version 1.1.0:
    • Chat messages are now translated by default as "auto" -> "player language or server language"
    • Name of the player is inserted in the text at the top right of the text.

    Version 1.2.0:
    • Chat messages are tagged with the player's color-coded name
    • BugFixes: / trans clear no longer references the help ;-)
    • Improvement in the result extraction: (Error: uno) this either the XML file (ChatAutoTranslatesDB.xml) must be deleted or the entry "TanslateRespose" must be removed so that it is re-inserted.
    Version 1.3.0:
    • Translation requests are delayed
    • Translations only take place after a minimum number of characters
     

    Attached Files:

    #1
    Last edited: Sep 26, 2018
    Ephoie, GasBandit and Hummel-o-War like this.
  2. GasBandit

    GasBandit Commander

    Joined:
    Mar 19, 2017
    Messages:
    43
    Likes Received:
    35
    Interesting mod... one suggestion though -

    Given that google translate has an automatic "detect language" setting, would it not be possible to use that, and not require users to specify their language abbreviation before other users can get the translation? I'm pretty sure that EAH already uses this (if you mouse over the text in EAH's chat scroll, a tooltip appears that automatically translates it).
     
    #2
  3. ASTIC

    ASTIC Captain

    Joined:
    Dec 11, 2016
    Messages:
    991
    Likes Received:
    707
    Hmm I think about how such a thing could be realized. Maybe have a solution on Thursday 27.09.18 ;-)
     
    #3
    Ephoie and GasBandit like this.
  4. KayaM82

    KayaM82 Lieutenant

    Joined:
    Jan 14, 2017
    Messages:
    56
    Likes Received:
    20
    Okay, irgendetwas mach ich falsch ^^
    Zip heruntergeladen und im Mod Ordner entpackt, nur die .dll datei wird entpackt.

    Auf dem Server im Fraktions Chat dann getestet, aber leider keine Reaktion auf die Eingaben es wird auch keine .xml erstellt!

    Hab ich etwas überlesen ??
     
    #4
  5. ASTIC

    ASTIC Captain

    Joined:
    Dec 11, 2016
    Messages:
    991
    Likes Received:
    707
    Du musst die DLL in ein Verzeichnis (z.b. autotranslate) unter dem Mod Ordner packen.

    PS ich bin noch dabei und werde noch eine neue version hochladen...

    --------

    PSS: So, neue Version 1.1.0 ist da ... probiert sie aus und meldet mir Fehler oder Verbesserungen denn es ist fast unmöglich für mich diese Mod im "Singleplayer" zu testen ;-)
     
    #5
    Last edited: Sep 24, 2018
    Ephoie and KayaM82 like this.
  6. ASTIC

    ASTIC Captain

    Joined:
    Dec 11, 2016
    Messages:
    991
    Likes Received:
    707
    Version 1.1.0 now translates the texts from "auto" -> language ;-) by default
    PS: ... try it out and report errors or improvements because it is almost impossible for me to test this mod in the "single player" ;-)
     
    #6
    Ephoie likes this.
  7. GasBandit

    GasBandit Commander

    Joined:
    Mar 19, 2017
    Messages:
    43
    Likes Received:
    35
    Will do! Thanks much for all your efforts!

    Do I need to delete the previous XML config file and let it regenerate, or will the current one still work?
     
    #7
    Ephoie likes this.
  8. ASTIC

    ASTIC Captain

    Joined:
    Dec 11, 2016
    Messages:
    991
    Likes Received:
    707
    The current one still work and will be updated automatically.
     
    #8
    Ephoie likes this.
  9. GasBandit

    GasBandit Commander

    Joined:
    Mar 19, 2017
    Messages:
    43
    Likes Received:
    35
    Slight bug... though automatic translation of any detected language seems to work, it seems to stumble on the word "uno" when said by itself... I don't know if that's because it could be more than one language, or if it's just too short, or what, but it generates this result:

    [​IMG]

    Other phrases seem to work...

    [​IMG]

    [​IMG]


    But... uno keeps sending that same string

    [​IMG]

    Also, there doesn't seem to be a way to turn it off, if you no longer want the translation notifications... I have to remove the player who doesn't want translations from the xml file manually.
     
    #9
  10. ASTIC

    ASTIC Captain

    Joined:
    Dec 11, 2016
    Messages:
    991
    Likes Received:
    707
    Thanks for the feedback - I have just taken care about this in the version 1.2 ;-)
     
    #10
    Ephoie likes this.
  11. Ephoie

    Ephoie Captain

    Joined:
    Jan 27, 2018
    Messages:
    329
    Likes Received:
    515
    Hey, @ASTIC
    Is this still a functional mod?
     
    #11
  12. ASTIC

    ASTIC Captain

    Joined:
    Dec 11, 2016
    Messages:
    991
    Likes Received:
    707
    I haven't used it myself for a while but it should work. Only when there are too many chat messages does the free GoggleAPI shut down for a while.
     
    #12
    Ephoie likes this.

Share This Page