e107 icon indicating copy to clipboard operation
e107 copied to clipboard

Do not trim language editor translation whitespaces

Open newbthenewbd opened this issue 6 years ago • 5 comments

Currently, when there are whitespaces at the ends of translations, e.g. define("LAN_ONLINE_1", "Guests: ");, they get trimmed in the language editor. This causes two kinds of problems: one about the original translations not getting accurately presented when they actually do contain whitespaces at the trimmed location, and the other about the translations added by translators getting the whitespaces removed the second time they are saved.

As far as I'm aware, this issue might be the cause of that discrepancy in the Polish e107 language pack, and sure slowed down my ~still awfully slow~ efforts in order to get the pack up to date somewhat. :slightly_smiling_face:

This change should hopefully fix that.

newbthenewbd avatar Oct 24 '18 08:10 newbthenewbd

Thank you @newbthenewbd ! Typically the white-space should be added in the PHP script, and not in the LAN_XXX, which is why it trims it by default. So, we need to correct it on the other side, not in the LAN file.

CaMer0n avatar Oct 24 '18 17:10 CaMer0n

Thank you @newbthenewbd ! Typically the white-space should be added in the PHP script, and not in the LAN_XXX, which is why it trims it by default. So, we need to correct it on the other side, not in the LAN file.

@CaMer0n Ouch! You're talking adding whitespaces when there's concatenated LANS? In all files? That's a TITANIC job.... :ship:

rica-carv avatar Oct 26 '18 07:10 rica-carv

@CaMer0n What do you think of allowing 1 space at the beginning and at the end? Or to use   in such cases?

SimSync avatar Mar 22 '19 07:03 SimSync

@SimSync I don't like it. Also, somewhat related, is that we shouldn't be using concatenated LANS to build sentences that contain variables between them, but rather use variables (like [x]) inside a single LAN.

CaMer0n avatar Apr 06 '19 17:04 CaMer0n

@CaMer0n You are right. At least for new lans this should be the way it should be done.

SimSync avatar Apr 07 '19 09:04 SimSync