nextcloud / server

☁️ Nextcloud server, a safe home for all your data
https://nextcloud.com
GNU Affero General Public License v3.0
27.54k stars 4.08k forks source link

l10n: [user_ldap] Extract "%" from text string #26345

Open Valdnet opened 3 years ago

Valdnet commented 3 years ago

Extract "%" from the text string. This will make the string translation easier and avoid translation errors.

https://github.com/nextcloud/server/blob/aec9c8437a3de5d69451ae303ac5334b412f76d8/apps/user_ldap/templates/part.wizard-server.php#L10

szaimen commented 3 years ago

I am not sure if %s is extractable here. cc @nextcloud/server

ghost commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity and seems to be missing some essential information. It will be closed if no further activity occurs. Thank you for your contributions.

Valdnet commented 3 years ago

ping @nextcloud/server

szaimen commented 3 years ago

Now that I understand the syntax better, this should probably work:

p($i++ . '. ' . $l->t('Server:');
rakekniven commented 3 years ago

@szaimen Can you solve this?

szaimen commented 3 years ago

cc @nickvergessen if my syntax looks fine. If it does, I'll go ahead and create a PR :)

nickvergessen commented 3 years ago

What szaimen posted does not work for RTL lamguages. The currently used approach is therefor the correct one, unless the full template is remodeled to use a ol>li element layout.

Maybe a help string would be good instead?

rakekniven commented 2 years ago

@nickvergessen Help string = Translator comment ?

nickvergessen commented 2 years ago

Feel free to add one. Also the $_['serverConfigurationHosts'][$prefix] part should be moved into the translation with a placeholder btw. Maybe it's then not even as confusing anymore.