I noticed in some strings the translator is able to choose the amount of decimals in numbers.
Like "%2$.2f" might become "1.23".
If the number is always suppose to have the same amount of decimals maybe it's better to have the chose or decimals done in the code by the programmers and just give a string placeholder for the translators.
That way the translator can't mess it up by for example changing "%2$.2f" to "%2$,2f" (using comma) which would cause the page to not load.
And if at some point the programmers want to change the amount of decimals at a later point it would be smarter for them to just do so instead of having to tell all the translators to change "%2$.2f" to "%2$.1f" and wait for the translators to update the translations.
Here are some of the strings from phpBB 3.3.12. Maybe there are more.
You can see some of the strings in action if you go to your profile.
It might say:
Like "%2$.2f" might become "1.23".
If the number is always suppose to have the same amount of decimals maybe it's better to have the chose or decimals done in the code by the programmers and just give a string placeholder for the translators.
That way the translator can't mess it up by for example changing "%2$.2f" to "%2$,2f" (using comma) which would cause the page to not load.
And if at some point the programmers want to change the amount of decimals at a later point it would be smarter for them to just do so instead of having to tell all the translators to change "%2$.2f" to "%2$.1f" and wait for the translators to update the translations.
Here are some of the strings from phpBB 3.3.12. Maybe there are more.
Code:
\language\en\acp\search.php:2=> 'The current rate of indexing is approximately %1$.1f posts per second.',2=> 'The current rate of deleting is approximately %1$.1f posts per second.',\language\en\migrator.php:'MIGRATION_DATA_DONE'=> 'Installed Data: %1$s; Time: %2$.2f seconds','MIGRATION_DATA_IN_PROGRESS'=> 'Installing Data: %1$s; Time: %2$.2f seconds','MIGRATION_SCHEMA_DONE'=> 'Installed Schema: %1$s; Time: %2$.2f seconds','MIGRATION_SCHEMA_IN_PROGRESS'=> 'Installing Schema: %1$s; Time: %2$.2f seconds','MIGRATION_REVERT_DATA_DONE'=> 'Reverted Data: %1$s; Time: %2$.2f seconds','MIGRATION_REVERT_DATA_IN_PROGRESS'=> 'Reverting Data: %1$s; Time: %2$.2f seconds','MIGRATION_REVERT_SCHEMA_DONE'=> 'Reverted Schema: %1$s; Time: %2$.2f seconds','MIGRATION_REVERT_SCHEMA_IN_PROGRESS'=> 'Reverting Schema: %1$s; Time: %2$.2f seconds',\language\en\ucp.php:'AVATAR_EXPLAIN'=> 'Maximum dimensions; width: %1$s, height: %2$s, file size: %3$.2f KiB.','POST_DAY'=> '%.2f posts per day','POST_PCT'=> '%.2f%% of all posts','POST_PCT_ACTIVE'=> '%.2f%% of user’s posts','POST_PCT_ACTIVE_OWN'=> '%.2f%% of your posts',
It might say:
Total posts:
228 | Search user’s posts
(0.01% of all posts / 0.05 posts per day)
Most active forum:
[3.2.x] Translations
(56 Posts / 24.56% of your posts)
Most active topic:
Converting to PO format
(10 Posts / 4.39% of your posts)
Statistics: Posted by scootergrisen — Tue Aug 20, 2024 8:00 pm