Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adjust translations for PrimeNG 17 #143

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions de.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
"notEquals": "Ist ungleich",
"noFilter": "Kein Filter",
"filter": "Filtern",
"is": "Ist",
"after": "Nach",
"before": "Vor",
"isNot": "Ist nicht",
"lt": "Kleiner als",
"lte": "Kleiner oder gleich",
"gt": "Größer als",
Expand Down
6 changes: 5 additions & 1 deletion en.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"en":{
"en": {
"startsWith": "Starts with",
"contains": "Contains",
"notContains": "Not contains",
Expand All @@ -8,6 +8,10 @@
"notEquals": "Not equals",
"noFilter": "No Filter",
"filter": "Filter",
"is": "Is",
"after": "After",
"before": "Before",
"isNot": "Is not",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I could be wrong but should't PrimeNg be using these..

    "dateIs": "Date is",
      "dateIsNot": "Date is not",
      "dateBefore": "Date is before",
      "dateAfter": "Date is after",

?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK I looked at the source code and those 4 are not in any other lib PrimeFaces, PrimeVue or PrimeReact.

It seems they are just shortcuts to the real methods.

        is: (value: any, filter: any, filterLocale?: any): boolean => {
            return this.filters.equals(value, filter, filterLocale);
        },

        isNot: (value: any, filter: any, filterLocale?: any): boolean => {
            return this.filters.notEquals(value, filter, filterLocale);
        },

        before: (value: any, filter: any, filterLocale?: any): boolean => {
            return this.filters.lt(value, filter, filterLocale);
        },

        after: (value: any, filter: any, filterLocale?: any): boolean => {
            return this.filters.gt(value, filter, filterLocale);
        },

So I actually think these 4 are deprecated in PrimeNG and replaced with the 4 values that have translations so somewhere along the lines PrimeTek made all the libraries in line and left these 4 for backwards compatibility but they should probably be marked deprecated.

I just opened this PrimeNG ticket: primefaces/primeng#14446

"lt": "Less than",
"lte": "Less than or equal to",
"gt": "Greater than",
Expand Down