GithubHelp home page GithubHelp logo

openttd / eints Goto Github PK

View Code? Open in Web Editor NEW
5.0 5.0 9.0 3.61 MB

WebTranslator for OpenTTD and its add-ons

License: GNU General Public License v2.0

Makefile 0.09% Python 91.84% sed 0.02% CSS 0.41% Shell 0.08% Smarty 7.18% Dockerfile 0.39%

eints's Introduction

OpenTTD

Table of contents

1.0) About

OpenTTD is a transport simulation game based upon the popular game Transport Tycoon Deluxe, written by Chris Sawyer. It attempts to mimic the original game as closely as possible while extending it with new features.

OpenTTD is licensed under the GNU General Public License version 2.0, but includes some 3rd party software under different licenses. See the section "Licensing" below for details.

1.1) Downloading OpenTTD

OpenTTD can be downloaded from the official OpenTTD website.

Both 'stable' and 'nightly' versions are available for download:

  • most people should choose the 'stable' version, as this has been more extensively tested
  • the 'nightly' version includes the latest changes and features, but may sometimes be less reliable

OpenTTD is also available for free on Steam, GOG.com, and the Microsoft Store. On some platforms OpenTTD will be available via your OS package manager or a similar service.

1.2) OpenTTD gameplay manual

OpenTTD has a community-maintained wiki, including a gameplay manual and tips.

1.3) Supported platforms

OpenTTD has been ported to several platforms and operating systems.

The currently supported platforms are:

  • Linux (SDL (OpenGL and non-OpenGL))
  • macOS (universal) (Cocoa)
  • Windows (Win32 GDI / OpenGL)

Other platforms may also work (in particular various BSD systems), but we don't actively test or maintain these.

1.3.1) Legacy support

Platforms, languages and compilers change. We'll keep support going on old platforms as long as someone is interested in supporting them, except where it means the project can't move forward to keep up with language and compiler features.

We guarantee that every revision of OpenTTD will be able to load savegames from every older revision (excepting where the savegame is corrupt). Please report a bug if you find a save that doesn't load.

1.4) Installing and running OpenTTD

OpenTTD is usually straightforward to install, but for more help the wiki includes an installation guide.

OpenTTD needs some additional graphics and sound files to run.

For some platforms these will be downloaded during the installation process if required.

For some platforms, you will need to refer to the installation guide.

1.4.1) Free graphics and sound files

The free data files, split into OpenGFX for graphics, OpenSFX for sounds and OpenMSX for music can be found at:

Please follow the readme of these packages about the installation procedure. The Windows installer can optionally download and install these packages.

1.4.2) Original Transport Tycoon Deluxe graphics and sound files

If you want to play with the original Transport Tycoon Deluxe data files you have to copy the data files from the CD-ROM into the baseset/ directory. It does not matter whether you copy them from the DOS or Windows version of Transport Tycoon Deluxe. The Windows install can optionally copy these files.

You need to copy the following files:

  • sample.cat
  • trg1r.grf or TRG1.GRF
  • trgcr.grf or TRGC.GRF
  • trghr.grf or TRGH.GRF
  • trgir.grf or TRGI.GRF
  • trgtr.grf or TRGT.GRF

1.4.3) Original Transport Tycoon Deluxe music

If you want the Transport Tycoon Deluxe music, copy the appropriate files from the original game into the baseset folder.

  • TTD for Windows: All files in the gm/ folder (gm_tt00.gm up to gm_tt21.gm)
  • TTD for DOS: The GM.CAT file
  • Transport Tycoon Original: The GM.CAT file, but rename it to GM-TTO.CAT

1.5) Add-on content / mods

OpenTTD features multiple types of add-on content, which modify gameplay in different ways.

Most types of add-on content can be downloaded within OpenTTD via the 'Check Online Content' button in the main menu.

Add-on content can also be installed manually, but that's more complicated; the OpenTTD wiki may offer help with that, or the OpenTTD directory structure guide.

1.5.1) Social Integration

OpenTTD has the ability to load plugins to integrate with Social Platforms like Steam, Discord, etc.

To enable such integration, the plugin for the specific platform has to be downloaded and stored in the social_integration folder.

See OpenTTD's website, under Downloads, for what plugins are available.

1.6) OpenTTD directories

OpenTTD uses its own directory structure to store game data, add-on content etc.

For more information, see the directory structure guide.

1.7) Compiling OpenTTD

If you want to compile OpenTTD from source, instructions can be found in COMPILING.md.

2.0) Contact and Community

'Official' channels

'Unofficial' channels

2.1) Multiplayer games

You can play OpenTTD with others, either cooperatively or competitively.

See the multiplayer documentation for more details.

2.2) Contributing to OpenTTD

We welcome contributors to OpenTTD. More information for contributors can be found in CONTRIBUTING.md

2.3) Reporting bugs

Good bug reports are very helpful. We have a guide to reporting bugs to help with this.

Desyncs in multiplayer are complex to debug and report (some software development skils are required). Instructions can be found in debugging and reporting desyncs.

2.4) Translating

OpenTTD is translated into many languages. Translations are added and updated via the online translation tool.

3.0) Licensing

OpenTTD is licensed under the GNU General Public License version 2.0. For the complete license text, see the file 'COPYING.md'. This license applies to all files in this distribution, except as noted below.

The squirrel implementation in src/3rdparty/squirrel is licensed under the Zlib license. See src/3rdparty/squirrel/COPYRIGHT for the complete license text.

The md5 implementation in src/3rdparty/md5 is licensed under the Zlib license. See the comments in the source files in src/3rdparty/md5 for the complete license text.

The fmt implementation in src/3rdparty/fmt is licensed under the MIT license. See src/3rdparty/fmt/LICENSE.rst for the complete license text.

The nlohmann json implementation in src/3rdparty/nlohmann is licensed under the MIT license. See src/3rdparty/nlohmann/LICENSE.MIT for the complete license text.

The OpenGL API in src/3rdparty/opengl is licensed under the MIT license. See src/3rdparty/opengl/khrplatform.h for the complete license text.

The catch2 implementation in src/3rdparty/catch2 is licensed under the Boost Software License, Version 1.0. See src/3rdparty/catch2/LICENSE.txt for the complete license text.

The icu scriptrun implementation in src/3rdparty/icu is licensed under the Unicode license. See src/3rdparty/icu/LICENSE for the complete license text.

The monocypher implementation in src/3rdparty/monocypher is licensed under the 2-clause BSD and CC-0 license. See src/3rdparty/monocypher/LICENSE.md for the complete license text.

The OpenTTD Social Integration API in src/3rdparty/openttd_social_integration_api is licensed under the MIT license. See src/3rdparty/openttd_social_integration_api/LICENSE for the complete license text.

4.0 Credits

See CREDITS.md

eints's People

Contributors

alberth289346 avatar andythenorth avatar bouke avatar dependabot[bot] avatar frosch123 avatar glx22 avatar lordaro avatar nikolas avatar planetmaker avatar pyup-bot avatar truebrain avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

eints's Issues

Writing from right to left (Arabic)

The string editor in the translations by default types from the left to right, which messes up the Arabic sentences, which goes from the right to left, especially when English words are included, including Acronyms like "OpenTTD", or translations of multiple lines. The simplest solution so far is to type in a new line, however, the new line disappears when the translation is updated.
If the text direction can't be changed, it would be helpful if there was a way to start new lines.

Initial Update

The bot created this issue to inform you that pyup.io has been set up on this repo.
Once you have closed it, the bot will open pull requests for updates as soon as they are available.

[REQ] Single-page mode

It would be nice if there was a mode (in addition to what exists now) in which the user would see and edit everything in one page. At the left the list of strings would be shown (i.e. STR_ERROR_GAME_LOAD_FAILED, STR_ERROR_GAME_SAVE_FAILED, etc.) and when clicking on a string, all editing controls for it (textboxes, save button, etc) would appear on the right. With today's large screens with even larger resolutions, it could be feasible to see everything in one screen. Also in that mode, when saving, the list could remain in the last selected string, not be refreshed and force the user to start from the top again. This could be configurable (per user), he could just click on a button or combobox to select the screen mode.

Reaching important strings to translate

Usually, the easiest current way to translate targeted texts, that are most commonly used than others, I have to use the browser's find in page tool in the English lang file to find the string's name, and find that string in the language's string, which includes jumping between the game, English lang tab and the translator's tab.
I would suggest if there is some kind of search tool to search the English texts, I know it wouldn't work for many short strings, but mostly helpful for the longer strings.
I am fine with just searching the English lang file, but this would be a helpful tool if it's possible.
Thanks.

eints allows submitting strings with disallowed UTF8 characters

Specifically, U+200B (zero-width space)

Results in build failure:

  /home/runner/work/OpenTTD/OpenTTD/src/lang/japanese.txt:2405: FATAL: Unwanted UTF-8 character U+200B in sequence '{BLACK}道路の種類を変更/アップグレードします.Shiftは、コスト見積もりの​​作成/表示を切り替えます'

see OpenTTD/OpenTTD@b721787

& associated block in strgen

https://github.com/OpenTTD/OpenTTD/blob/224625942c44ec33519010ae320b3821d933229a/src/strgen/strgen_base.cpp#L735-L740

Initial Update

The bot created this issue to inform you that pyup.io has been set up on this repo.
Once you have closed it, the bot will open pull requests for updates as soon as they are available.

"Error: String parameter 0 may not be used for gender queries {G ..}"

Already posted to the TT forums but I'll see if I have better luck here.

There's a string: STR_STATION_VIEW_RESERVED that has to be translated to Spanish (Mexican) as follows:

{YELLOW}({CARGO_SHORT} reservad{G 0 o a}{P 0 "" s} para cargar)

The output in the game should look something like this:

  • 1 artículo reservado para cargar (male gender, singular)
  • 2 artículos reservados para cargar (male gender, plural)
  • 1 caja reservada para cargar (female gender, singular)
  • 2 cajas reservadas para cargar (female gender, plural)

However, the tool complains with Error: String parameter 0 may not be used for gender queries {G ..}. Changing the index parameter to 1 doesn't work either, and removing the gender syntax and only leaving the plural one does work. What am I missing?

I already tried a similar syntax with STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH_REQUIRED:

{ORANGE}{CARGO_TINY}/{CARGO_LONG}{RED} (todavía requerid{G 1 o a}{P 1 "" s})

And it came out without errors. I can sort of rephrase the translation as a workaround to avoid using genders in that specific string, but I'm more interested in knowing what's causing the G syntax to fail.

The documentation in the wiki is kind of confusing and seems incomplete, so I'd appreciate any help here. TIA.

EN_AU: Unable to update 2 outdated strings

https://translator.openttd.org/translation/openttd-master/en_AU shows 2 strings are outdated:
STR_CONFIG_SETTING_DRAG_SIGNALS_FIXED_DISTANCE_HELPTEXT
STR_RAIL_TOOLBAR_TOOLTIP_BUILD_RAILROAD_SIGNALS

When I click the "Save Changes & Get Next String" button, after updating the text of either of these strings by using the "Copy Base" button, it takes me to the other string and does NOT provide a message at the top of the window saying that it has updated the string.
Yes, I have explicitly logged out and back in to the Web Translator service, and URL has ?message=... added to it for both actions. This is missing from the URL returned when I click the "Save Changes..." button.

Base language version error

When working on translating to pt_BR language I am getting repeatedly the following type of error message, after either clicking on the Save Changes & Get Next String or Get Another String buttons:

Error: 404 Not Found
Sorry, the requested URL 'https://translator.openttd.org/string/openttd-master/pt_BR/STR_FINANCES_YEAR_CAPTION' caused an error:
String cannot be translated, its base language version is incorrect

This behavior had begins today (2024/01/23).
Any guidance/advice?

Cant correct translated words

Hi, here are some bad translated words in to Lithuanian language. But i cant correct these words, because it said to me i have no persmision. How i can do that or i need with your verification ? Thanks. With Love playing oTTD

Unable to use STRING1 or anyother non standard modifiers in translations

When i try to use STRING1 or STRING2 or RAW_STRING in translations from the base string, an error is shown.

Steps to replicate: (Translation to ta_IN)
STR_TIMETABLE_TRAVEL_FOR_ESTIMATED
Base lang string: Travel (for {STRING1}, not timetabled)
Translation: பயணம் ({STRING1}, நேர அட்டவணை இடப்படாதது)

Throws the following error:
Error: String command for position 0 is wrong, base language uses {STRING}, the translation uses {STRING1}

I am unable to save string unless these modifiers are corrected to STRING

[REQ] Filtering...

It would be nice if in the main language screen (where all strings are shown) one could somehow filter the list by Status (so after saving, the next item from that specific status will be fetched, not a random invalid, outdated or missing string). Using the same logic, the list could also be filtered by a keyword, so the next item after saving would be an item containing the filtered word (translated text, not original).

Gender variation for strings returns error

I'm trying to translate "STR_NETWORK_CLIENT_LIST_PLAYER_NAME_QUERY_CAPTION" into he_IL.

The en_US base translation is "Your player name" while (for example) the ru_RU translation is "Ваше игровое имя". Both are gender agnostic. However, in he_IL, "player" is different depending on gender.

I tried to use as a template the pattern from "STR_NEWS_AIRCRAFT_DEST_TOO_FAR" from current he_IL translation file:

"{WHITE}{VEHICLE}אינ{G 0 "ו" "ה"} יכול{G 0 "" "ה"} להגיע אל היעד הבא כי הוא מחוץ לטווח".

For "STR_NETWORK_CLIENT_LIST_PLAYER_NAME_QUERY_CAPTION" it is supposed to look like this:

"שם השחק{G 0 "ן" "נית"} שלך".

But I get the following error message:

"Error: String parameter 0 is out of bounds for gender queries {G ..}"

I also looked in the docs and tried both with and without quotation marks and got the same error.

I can spend some time and try to rephrase the string into gender neutral/agnostic form, but it may sound sort of unnatural for the casual player. So before going there, I'd be happy to get any suggestions for resolving this issue.

P.S. A possibly related issue was previously reported here. Perhaps there is a dependency that needs to be enabled for this string to have the option to morph according to gender?

"String editing Manual" link is dead

The string editing page has a link to the "String editing Manual" pointing to a openttdcoop.org URL, which is dead.

<a class="pull-right" target="_blank" href="http://bundles.openttdcoop.org/eints/nightlies/LATEST/docs/strings.html">String editing Manual</a>

This should perhaps be pointed to a wiki.openttd.org page instead?

Reverting translations fails

OpenTTD/OpenTTD#10058 made a change in the base language:

-STR_AI_SETTINGS_CAPTION_AI                                      :AI
+STR_AI_SETTINGS_CAPTION_AI                                      :{WHITE}AI Parameters

A few months later OpenTTD/OpenTTD#10446 reverted that change:

-STR_AI_SETTINGS_CAPTION_AI                                      :{WHITE}AI Parameters
+STR_AI_SETTINGS_CAPTION_AI                                      :AI

Translators tried to follow this change:

  • Updating the translation from "AI" to "{WHITE}AI Parameters" worked.
  • Updating the translation from "{WHITE}AI Parameters" back to "AI" is discarded by Eints. Probably because it matches an older translation.

Known work-around:

  • Changing the translation to some "foobar" as an intermediate translation, so that "AI" becomes the previous-previous translation instead of the previous one, allows retranslating the string to "AI" again.

Eints is reverting/ignoring translations, but they still exist in the History

I've noticed Eints is overwriting or, more accurately, "reverting" translations, but the updated changes are still shown in the History. This is what is happening:

  1. I change a translation of a string.
  2. Eints saves the translation correctly. When I refresh and review the strings page, everything looks in order.
  3. However, at some point, when I download the latest build and open the game, I discover many of the changes were ignored/reverted to an older translation.
  4. Then, I go back to the strings page and it now shows these "reversions", as if I had done nothing.
  5. However, if I click on a string I suspect Eints reverted, and try to see the history, it shows the saved change, though the current translated string is still the older version.
  6. If I change the string again, the next build of the game apparently registers the updates alright.

Here's an image that explains it better: image

As you can see, the changes were successfully saved 2 weeks ago, but the current translated string is showing the previous, wrong version. Whenever I change any translation, I make sure I get the blue message telling me the string was successfully changed, so I don't know what's happening or if this occurs to other translators.

Is there a way to prevent this behavior, or better yet, to recover all those updates as the new translations, since they are apparently correctly stored somewhere, in order to avoid going over each string again?

edit:

Something really funky is happening here. If I fix any translation, the History now says the "older" version is the one made 2 weeks ago...

image

This is quickly becoming a mess lol. 😵

STR_NEWS_SUBSIDY_WITHDRAWN_SERVICE - order of {STRING}

en string: {BIG_FONT}{BLACK}Subsidy withdrawn:{}{}{STRING} service from {STRING} to {STRING} is no longer subsidised

string with context: {BIG_FONT}{BLACK}Subsidy withdrawn:{}{}{STRING1} service from {STRING2} to {STRING3} is no longer subsidised

context translated to: {BIG_FONT}{BLACK}Subsidy withdrawn:{}{} from {STRING2} to {STRING3} {STRING1} service is no longer subsidised

But I dont believe the context is translated properly in the current output. can someone clarify this or am I missing something?

[REQ] In main language screen, show original (EN) text along with the translations

When clicking on a language, all translation strings appear in a single screen, grouped by Status. it would be nice if under or over each translation, the original (EN) text also existed. That way, one could just take a quick look in a single page and see if the quality of all translations is acceptable to him or it needs corrections. Some separators (lines or different background colors) would be nice in this case.

[Feature Request] Add Translator Comments

Motivation

The current version of the web translator doesn't allow adding comments.

In some cases, comments are necessary, e.g., the target language doesn't have a similar word, and it must be replaced with a different one.

Another example is breakers, in which they are " " (spaces, or {ZWSP}, if it is going to be added to the game). Sometimes the English language uses {NBSP} to prevent breaking the string, but in other languages (e.g., zh_CN and zh_TW), there are no breakers, and breaking the string is acceptable.

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.