Laravel-Lang / lang

List of 126 languages for Laravel Framework, Laravel Jetstream, Laravel Fortify, Laravel Breeze, Laravel Cashier, Laravel Nova, Laravel Spark and Laravel UI.

Home Page:https://laravel-lang.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Laravel 8 - missing paginator translations (tailwind)

xorock opened this issue · comments

Hello,
In Laravel 8 Tailwind paginator has new translation keys:

{!! __('Showing') !!}
<span class="font-medium">{{ $paginator->firstItem() }}</span>
{!! __('to') !!}
<span class="font-medium">{{ $paginator->lastItem() }}</span>
{!! __('of') !!}
<span class="font-medium">{{ $paginator->total() }}</span>
{!! __('results') !!}

I don't see translation in any language.

it's very bad for translations... not good for right to left language, and not adaptation for results if we have just one result...

'{0} No item|[1] Showing :firstItem to :lastItem of :totalItems result |[2,*] Showing :firstItem to :lastItem of :totalItems results'

do you have source of this code please ?

I can see other keys accessed through the pagination (https://github.com/illuminate/pagination/blob/c5da788f8c7cf7c24a43d60b9bcf0b992457c30c/resources/views/tailwind.blade.php#L6).

I will try to send PR to the project.

I had sent a PR #1361

@andrey-helldar Added "Go to page :page" to PR, the other translations seem to be

@caouecs (#1359 (comment)) If there is only one result, the pagination component is not displayed by default. But it is convenient to add a PR to Laravel to improve the translation support for right-left languages

I believe that it is necessary to bring the key references in the Laravel Framework project to a single form.
Now the tailwind file contains calls to both the json file and the pagination.php file. In my opinion, this is not very good.
I have submitted PR to Taylor's projects: laravel/framework#34518 and laravel/laravel#5426

@caouecs, so we need to add a translation - Taylor refuses.

image

My language is RTL (Arabic) and I can say that there is no need to make any improvements to the pagination

@mohamedsabil83 Those are good news!

There is a problem with the Russian language.

The full phrase in heather sounds like this:
Showing 4 to 8 of 32 results

In Russian, it will be correct:
Показано с 4 по 8 из 32 результатов

In the current scheme, the translation will be incorrect.

There are two solutions:

  1. Показано 4 - 8 из 32 результатов
"Showing": "Показано с",
"to": "по",
"of": "из",
"results": "результатов"

The second option is bad because the word "showing" can be used elsewhere.

At the same time, in Russian, the "to" particle is translated depending on the context.
For example:

Come to the table Подойти к столу
3 to 5 entries с 3 по 5 записей

Since now the word "Showing" is used only in one place, I suggest using the second option (#1362), as it is more acceptable for display.
And when this word is used somewhere else, then I will think about how best to choose the context.

@andrey-helldar, in Spanish it happens exactly the same, so I applied a solution very similar to yours. I think that as long as these words ("Showing", "to", "of", ... ) are only used in the context of pagination there will be no problem. The translation does not have to be so literal, the idea is to keep the coherence of the phrase shown in this specific context.
If there are changes in the future we will review

Exactly. Now I propose to do so, and then we'll see.

At the moment it would only be missing for @caouecs to update the todo.md file to be able to close this issue! (And of course complete the translations of the other languages)

If they don't want to update the code, we can propose it in a package

If they don't want to update the code, we can propose it in a package

So we sent some PRs)

PR was merged: laravel/framework#34568 😊

My PR for this repo: #1368

The problem from the first message has been resolved, so I close the issue.