BookStackApp / BookStack

A platform to create documentation/wiki content built with PHP & Laravel
https://www.bookstackapp.com/
MIT License
15.36k stars 1.92k forks source link

Limited translation options in czech language on Crowdin #2084

Closed Venkinovec closed 4 years ago

Venkinovec commented 4 years ago

Describe the bug I cannot translate variable named 'x_chapter' located in 'entities.php'. Hint tells me to use two OR cases ':count Chapter|:count Chapters'. We have 4 cases of using word 'chapter' in 3 different writtings and one writting is used in two cases.

Steps To Reproduce Look for more in issues at Crowdin.

Expected behavior Should be able to translate it completely.

Screenshots image

Your Configuration (please complete the following information): BookStack v0.29.1

mahdi1234 commented 4 years ago

How about reverse it

kapitol :count

or

počet kapitol :count

seems legit to me (if it's possible to do it like this).

ssddanbrown commented 4 years ago

Hi @Venkinovec, BookStack uses Laravel's translation system, pluralisation cases can follow the formats defined here: https://laravel.com/docs/6.x/localization#pluralization

Therefore the format in the following example can be used:

'apples' => '{0} There are none|{1} There is one|[2,*] There are :count',
Venkinovec commented 4 years ago

Hmmm, I didn't think about this one.

počet kapitol

If I change other counters to "počet" then it will look naturally. Thank you for this advise.

Venkinovec commented 4 years ago

Hi @Venkinovec, BookStack uses Laravel's translation system, pluralisation cases can follow the formats defined here: https://laravel.com/docs/6.x/localization#pluralization

Therefore the format in the following example can be used:

'apples' => '{0} There are none|{1} There is one|[2,*] There are :count',

Wow, I will use the system then. Thank you @ssddanbrown

Venkinovec commented 4 years ago

I'll study Laravel's localization a bit, since I plan to complete czech translation.

Venkinovec commented 4 years ago

I forgot (since I was focused on one problem). Is there a way to modify recent activies to the point where I can change the structure of sentence completely (change position of username in text) ?I would like to have something like:

page :page created/edited/deleted by user :username

Otherwise I would have to recognize gender. On Crowdin I saw in other languages modifications only to the grey part of the text. image

ssddanbrown commented 4 years ago

@Venkinovec Unfortunately not, at least not quickly & easily. Since the user and asset components are linked, and therefore within different HTML elements, it make it tricky to have in a single string, at least while ensuring content remains escaped and secure.