Author Topic: German in the code  (Read 46884 times)

0 Members and 1 Guest are viewing this topic.

Offline Dwachs

  • DevTeam, Coder/patcher
  • Administrator
  • *
  • Posts: 4128
  • Total likes: 128
  • Helpful: 147
  • Languages: EN, DE, AT
Re: German in the code
« Reply #350 on: January 30, 2017, 08:57:03 PM »
James: Thanks for bringing this up again. It is hard to review such big patches (you translate new_world -> new_get_world?). If this change (welt -> world) would help anything, I can throw it in. But there are still 'welt'names objects, (get_weltpos, gui/welt.h etc).

Here is an updated list of terms including 'ware' with proposed translations. This list should not be too controversial:
Code: [Select]
ware_besch_t -> goods_desc_t  (types of goods/freight, e.g., Passenger, Coal)
good_reader_t -> goods_reader_t -> add 's'
good_writer_t -> goods_writer_t -> add 's'
warenbauer_t -> goods_manager_t -> to be inline with goods_reader/writer
I did not see a conclusion of the discussion for the following ones:
Code: [Select]
ware_t --> cargo_t (to be as short as before)  - these is freight with destination (e.g., 10 people going to Berlin, 20t of Coal to the north pole)
ware variables/parameter -> ware (?)
There are get_ware* methods. What to do with them:
Code: [Select]
factory_supplier_desc_t::get_ware - type of goods consumed by a factory (dat-file parameter: "inputgood") -> get_input / get_type ?
factory_product_desc_t::get_ware -  type of goods produced by a factory (dat-file parameter: "outputgood")-> get_output / get_type ?
vehicle_desc_t::get_ware - type of goods transported by a vehicle (dat-file parameter: "freight"), similar method: vehicle_t::get_cargo_type -> use this name?
Also haltestelle_t (halts) has quite a few get_ware_* methods.
Parsley, sage, rosemary, and maggikraut.

Online jamespetts

  • Simitrans-Extended project coordinator
  • Devotee
  • *
  • Posts: 14987
  • Total likes: 335
  • Helpful: 148
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: German in the code
« Reply #351 on: January 30, 2017, 09:10:39 PM »
The suggestions made in the first two code boxes seem sensible to me.

As to the last, I prefer "get_output" to "get_type", as it seems to indicate more clearly what is happening.

In the meantime, here is a list of one or two other miscellaneous translation suggestions:

merke_passagier_ziel > mark_passenger_destination
liefere_an_fabrik > deliver_to_factory
liefere_an > deliver_to_factory_without_route
starte_mit_route > deliver_to_factory_with_route
menge > amount
gibt_ab > accepts_type
get_ware_fuer_zielpos > get_goods_for_destination_pos ("_pos" might be omitted if it is clear that we are not referring to a destination stop)
get_ware_fuer_zwischenziel > get_goods_for_transfer
get_ware_summe > get_goods_total
vereinige_waren > merge_goods
verbinde_fabriken > connect_factory_to_halt (or possibly just connect_factory)
haltestelle_t > stop_t
halthandle_t > stop_handle_t
alle_haltestellen > all_stops
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Offline Vladki

Re: German in the code
« Reply #352 on: January 30, 2017, 10:14:14 PM »
As to the last, I prefer "get_output" to "get_type", as it seems to indicate more clearly what is happening.

I would suggest something like get_output_type, so that it is clear that you are interested in type of output goods, and not about the output capacity, or current storage. (I admit I did not look into the sources ;)

Offline Ters

  • Coder/patcher
  • Devotee
  • *
  • Posts: 4510
  • Total likes: 154
  • Helpful: 106
  • Languages: EN, NO
Re: German in the code
« Reply #353 on: January 31, 2017, 06:34:48 AM »
I'm with Vladki on that last one. It matches up with a similar function on vehicle_t. Which means that at least this one isn't a case of n proposals with one vote each.

Online jamespetts

  • Simitrans-Extended project coordinator
  • Devotee
  • *
  • Posts: 14987
  • Total likes: 335
  • Helpful: 148
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: German in the code
« Reply #354 on: January 31, 2017, 12:29:54 PM »
Seems sensible.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 8664
  • Total likes: 288
  • Helpful: 227
  • Languages: De,EN,JP
Re: German in the code
« Reply #355 on: February 02, 2017, 11:16:08 AM »
I am still somewhat opposed to rename ware for goods, as this is english unlike a lot of other stuff. (And before someone suggest to use stuff instead of goods, as it covers passengers too ;)

But if renaming, I suggest accepts_type should be accepts_good.

Offline Dwachs

  • DevTeam, Coder/patcher
  • Administrator
  • *
  • Posts: 4128
  • Total likes: 128
  • Helpful: 147
  • Languages: EN, DE, AT
Re: German in the code
« Reply #356 on: February 02, 2017, 12:56:09 PM »
I completed the translation of besch stuff including renaming of files locally on my computer.

My proposal would be to translated ware(n) to cargo or freight.
Parsley, sage, rosemary, and maggikraut.

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 8664
  • Total likes: 288
  • Helpful: 227
  • Languages: De,EN,JP
Re: German in the code
« Reply #357 on: February 03, 2017, 10:53:28 AM »
We covered that some pages before ... Aparently freight or cargo is only stuff moving, while ware (or goods) can be also stationary (so "ware house" or "goods shed"). So it seems rather ware or goods was the conclusion.

(But I contributed so little lately, I leave it to you.)

Offline An_dz

  • Web Admin
  • Administrator
  • *
  • Posts: 2507
  • Total likes: 263
  • Helpful: 89
  • D'oh
    • by An_dz
  • Languages: PT, EN, (it, de)
Re: German in the code
« Reply #358 on: February 16, 2017, 02:04:07 PM »
I have three patches to fix some typos and to translate some German comments. I've divided to help, the makeobj.patch fixes some typos in the makeobj messages.

Edit: patches removed, all were committed in trunk.
« Last Edit: February 18, 2017, 04:50:43 PM by An_dz »

Offline Dwachs

  • DevTeam, Coder/patcher
  • Administrator
  • *
  • Posts: 4128
  • Total likes: 128
  • Helpful: 147
  • Languages: EN, DE, AT
Re: German in the code
« Reply #359 on: February 16, 2017, 06:53:47 PM »
Please commit these patches :) Thanks!
Parsley, sage, rosemary, and maggikraut.

Offline An_dz

  • Web Admin
  • Administrator
  • *
  • Posts: 2507
  • Total likes: 263
  • Helpful: 89
  • D'oh
    • by An_dz
  • Languages: PT, EN, (it, de)
Re: German in the code
« Reply #360 on: February 18, 2017, 12:29:08 PM »
I've translated what I could from platzsucher without messing with platzsucher_t, please review it's ok.

Edit: patch removed, updated version below
« Last Edit: February 18, 2017, 04:51:12 PM by An_dz »

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 8664
  • Total likes: 288
  • Helpful: 227
  • Languages: De,EN,JP
Re: German in the code
« Reply #361 on: February 18, 2017, 01:00:49 PM »
neu_starten is rather restart

Also I would suggest beste_reihe into best_row, reihe into row and psuch1 into results_straight and psuch2 into results_rotated

Offline An_dz

  • Web Admin
  • Administrator
  • *
  • Posts: 2507
  • Total likes: 263
  • Helpful: 89
  • D'oh
    • by An_dz
  • Languages: PT, EN, (it, de)
Re: German in the code
« Reply #362 on: February 18, 2017, 02:35:28 PM »
Thanks, changed it.

Edit:
Now I've translated everything, including platzsucher_t and all derived classes. Please review everything is well translated. I've already tested if it compiles. And what's the best translation for spalten?
« Last Edit: February 18, 2017, 03:39:31 PM by An_dz »

Offline An_dz

  • Web Admin
  • Administrator
  • *
  • Posts: 2507
  • Total likes: 263
  • Helpful: 89
  • D'oh
    • by An_dz
  • Languages: PT, EN, (it, de)
Re: German in the code
« Reply #363 on: February 20, 2017, 12:45:05 PM »
Just posting again as prissi and Dwachs might have not noticed my edit above ;D :P

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 8664
  • Total likes: 288
  • Helpful: 227
  • Languages: De,EN,JP
Re: German in the code
« Reply #364 on: February 20, 2017, 01:03:05 PM »
Reihe row
Spalte column

Just one last (easy) comment: Should this function not be rather a "finder"? In the comments in other sections I found more mentioning of wayfinder,  etc.

In any case, thank you.

Offline Dwachs

  • DevTeam, Coder/patcher
  • Administrator
  • *
  • Posts: 4128
  • Total likes: 128
  • Helpful: 147
  • Languages: EN, DE, AT
Re: German in the code
« Reply #365 on: February 20, 2017, 07:11:23 PM »
ist_randfeld -> is_boundary_place (rand = boundary, feld = place/tile/position/etc)
ist_feld_ok -> is_position_ok (checks a single tile, ist_platz_ok checks complete area of  b x h tiles)
strasse_bei -> is_road_at ?
Parsley, sage, rosemary, and maggikraut.

Offline An_dz

  • Web Admin
  • Administrator
  • *
  • Posts: 2507
  • Total likes: 263
  • Helpful: 89
  • D'oh
    • by An_dz
  • Languages: PT, EN, (it, de)
Re: German in the code
« Reply #366 on: February 20, 2017, 08:59:45 PM »
ist_feld_ok -> is_tile_ok (checks one tile)
ist_platz_ok -> is_area_ok (checks area of tiles)
ist_randfeld -> is_boundary_tile

Took me quite a while to understand what ist_randfeld was doing, I'll add this comment above it to explain what it does:
Code: [Select]
/*
 * Checks if the tile is part of the building or if it's a boundary tile
 * @return false, when tile is part of the building
 * @return true, when tile is the boundary tile of the building
 */

strasse_bei -> is_road_at ?
Agree.

Offline Ters

  • Coder/patcher
  • Devotee
  • *
  • Posts: 4510
  • Total likes: 154
  • Helpful: 106
  • Languages: EN, NO
Re: German in the code
« Reply #367 on: February 21, 2017, 06:25:54 AM »
strasse_bei -> is_road_at ?

If the context is that you have a road, and want to check if that road is at a particular location, that seems a good choice. If the context is that you have a tile, and want to know if it contains any road, I would have gone with has_road.

Offline An_dz

  • Web Admin
  • Administrator
  • *
  • Posts: 2507
  • Total likes: 263
  • Helpful: 89
  • D'oh
    • by An_dz
  • Languages: PT, EN, (it, de)
Re: German in the code
« Reply #368 on: February 21, 2017, 12:17:02 PM »
The context is the later. But I would agree if you would call this as tile->has_road() but as it's is_road_at(x, y) then I think the current is better.

Offline An_dz

  • Web Admin
  • Administrator
  • *
  • Posts: 2507
  • Total likes: 263
  • Helpful: 89
  • D'oh
    • by An_dz
  • Languages: PT, EN, (it, de)
Re: German in the code
« Reply #369 on: February 24, 2017, 06:21:11 PM »
@dwachs
I see you translated grundwasser as groundwater. I think it would be better as waterground.

Offline Dwachs

  • DevTeam, Coder/patcher
  • Administrator
  • *
  • Posts: 4128
  • Total likes: 128
  • Helpful: 147
  • Languages: EN, DE, AT
Re: German in the code
« Reply #370 on: February 24, 2017, 06:23:55 PM »
This does not seem to be an English word? I felt groundwater_level was too long. Feel free to change to something better :)
Parsley, sage, rosemary, and maggikraut.

Offline An_dz

  • Web Admin
  • Administrator
  • *
  • Posts: 2507
  • Total likes: 263
  • Helpful: 89
  • D'oh
    • by An_dz
  • Languages: PT, EN, (it, de)
Re: German in the code
« Reply #371 on: February 24, 2017, 06:59:14 PM »
Maybe change to simply waterlevel, as I searched and groundwater is the water beneath the surface, like in aquifers.

Offline Ters

  • Coder/patcher
  • Devotee
  • *
  • Posts: 4510
  • Total likes: 154
  • Helpful: 106
  • Languages: EN, NO
Re: German in the code
« Reply #372 on: February 24, 2017, 08:24:26 PM »
One might call it ocean or sea. Maybe sealevel, but that is more about the height than the actual surface, I think.

Offline An_dz

  • Web Admin
  • Administrator
  • *
  • Posts: 2507
  • Total likes: 263
  • Helpful: 89
  • D'oh
    • by An_dz
  • Languages: PT, EN, (it, de)
Re: German in the code
« Reply #373 on: February 24, 2017, 09:03:28 PM »
You can, but sea/ocean depends on your interpretation of what is sea/ocean. This level can be used for a 4x4 square full of water, but I wouldn't call that an ocean. ;)

Offline isidoro

Re: German in the code
« Reply #374 on: February 25, 2017, 12:12:03 AM »
Agree.  Sometimes precision isn't needed when there will be no doubt about what it means in the game.

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 8664
  • Total likes: 288
  • Helpful: 227
  • Languages: De,EN,JP
Re: German in the code
« Reply #375 on: February 25, 2017, 11:16:01 AM »
I though the ground water is called water table in English. Anyway, water_level should be very clear. Or maybe sea_level, because there are lakes above with the own water_level. Or submarine climate ...

Offline Ters

  • Coder/patcher
  • Devotee
  • *
  • Posts: 4510
  • Total likes: 154
  • Helpful: 106
  • Languages: EN, NO
Re: German in the code
« Reply #376 on: February 25, 2017, 11:39:42 AM »
I think ground water and water table is like ocean and sea level.

Online jamespetts

  • Simitrans-Extended project coordinator
  • Devotee
  • *
  • Posts: 14987
  • Total likes: 335
  • Helpful: 148
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: German in the code
« Reply #377 on: February 25, 2017, 12:28:43 PM »
I think ground water and water table is like ocean and sea level.

Not necessarily: the water table is the depth of ground water, which might well be higher than sea level depending on local circumstances. Ground water is usually fresh water.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Offline Ters

  • Coder/patcher
  • Devotee
  • *
  • Posts: 4510
  • Total likes: 154
  • Helpful: 106
  • Languages: EN, NO
Re: German in the code
« Reply #378 on: February 25, 2017, 04:06:13 PM »
Not necessarily: the water table is the depth of ground water, which might well be higher than sea level depending on local circumstances. Ground water is usually fresh water.

I wasn't comparing water table and sea level. I was comparing the comparisons.

Offline An_dz

  • Web Admin
  • Administrator
  • *
  • Posts: 2507
  • Total likes: 263
  • Helpful: 89
  • D'oh
    • by An_dz
  • Languages: PT, EN, (it, de)
Re: German in the code
« Reply #379 on: March 02, 2017, 12:59:27 AM »
So, everybody agrees with sea_level?



And I'm currently translating the last bits from the descriptor folder, I noticed a lot of incompatibilities among the files.

Some have member distribution_weight others have it called chance. Some have member cost, others call it price.

I think they should have the same name if they represent the same thing. And I also think the names should follow a closer relation to the dat parameters.

So what do you prefer?
cost vs. price
chance vs. distribution_weight

Online jamespetts

  • Simitrans-Extended project coordinator
  • Devotee
  • *
  • Posts: 14987
  • Total likes: 335
  • Helpful: 148
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: German in the code
« Reply #380 on: March 02, 2017, 01:01:07 AM »
I prefer "price" to "cost" and "chance" to "distribution_weight", as both are, in my view, clearer.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Offline DrSuperGood

Re: German in the code
« Reply #381 on: March 02, 2017, 04:44:30 AM »
Be aware that distribution weight and chance might be mechanically very different. A chance should be a probability, possibly in a fixed point form which represents how likely something will occur. A weight is an arbitrary number that larger numerically means higher likelihood of occurring. A weight only has meaning when inside a set of objects to select from, where as a probability has a meaning by itself. Probability is always normalized between 0.0 and 1.0 where as a weight can have an arbitrary scale. One can get a probability for a specific weight from a set of weights, but not from a weight alone.

For example in Simutrans...
Chance for passengers/mail to spawn from a specific building -> passenger/mail_weight of building inside appropriate building set
Chance for either passengers or mail to be generated -> passenger/mail probability (only 1 is declared as other is implicitly the not probability of that)
« Last Edit: March 02, 2017, 04:57:23 AM by DrSuperGood »

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 8664
  • Total likes: 288
  • Helpful: 227
  • Languages: De,EN,JP
Re: German in the code
« Reply #382 on: March 02, 2017, 05:14:27 AM »
Some objects/decsriptors have more than one randoms parameter. As such, chance without anything specifying is less clear than before. Apart from the iferences between weights and probailities ountlined above.

I agree that it should be maintenance_cost but price for buying.

Offline An_dz

  • Web Admin
  • Administrator
  • *
  • Posts: 2507
  • Total likes: 263
  • Helpful: 89
  • D'oh
    • by An_dz
  • Languages: PT, EN, (it, de)
Re: German in the code
« Reply #383 on: March 02, 2017, 04:14:40 PM »
Ok, so I'll change:
cost -> price
wt -> wtyp (to to be similar to styp & own_wtyp)
obsolete_date -> retire_date
chance -> distribution_weight

Also, I believe the version check should be standardised. Some check from 0 to n, others from n to 0.

As I don't believe the compiler moves the order of those checks, I think all checks should be from n to 0.

Edit:
laden_abschliessen was renamed to finish_loading as it's the last step after loading objects and so to check xrefs.
« Last Edit: March 02, 2017, 05:39:11 PM by An_dz »

Online jamespetts

  • Simitrans-Extended project coordinator
  • Devotee
  • *
  • Posts: 14987
  • Total likes: 335
  • Helpful: 148
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: German in the code
« Reply #384 on: April 12, 2017, 10:25:21 PM »
I see that some splendid progress has been made on this of late, although I note that there is still a little work to do.

May I suggest the following furhter translations (all intended to be search/replace pairs, without "whole word only" unless with an asterisk)?

karte_t > world_t
world() > get_world()
welt > world

grund_t > ground_t
bd > gr *
ist_karten_boden > is_within_map
lookup_kartenboden > lookup_surface_tile
boden_ersetzen > replace_ground
wasser > water
ist_uebergang > is_transition

stadt > city

baum > tree

hausbauer > building_builder

get_weg_hang > get_way_slope
wegbauer > way_builder
weg > way
schiene > railway
strasse > road
kanal > canal
hat_wege > has_way

wegbauer > way_builder

warten_bis_weg_frei > wait_until_way_free

ribi > dirs

koord > world_coord
koord3d > world_coord3d
flughohe > altitude
hoehe > height

zeiger > ??? (cursor? pointer?)
bauigel > ??? (constructor? construction?)

vehikelbauer > vehicle_builder
fahrzeuge > vehicles

wolke > smoke
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.