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

selectOrdinal error #1911

Closed
SergelenOchir opened this issue Apr 9, 2024 · 2 comments
Closed

selectOrdinal error #1911

SergelenOchir opened this issue Apr 9, 2024 · 2 comments

Comments

@SergelenOchir
Copy link

SergelenOchir commented Apr 9, 2024

import {selectOrdinal, t} from '@lingui/macro';

export function PluralPaymentText(count: number) {
  try {
    return t({
      message: selectOrdinal(count, {
        one: '#st payment',
        two: '#nd payment',
        few: '#rd payment',
        other: '#th payment',
      }),
    });
  } catch (err) {
    console.log(err, 'error');
    return count;
  }
}

version: "@lingui/core": "^4.8.0"
this function is returning this error: [TypeError: Cannot read property 'prototype' of undefined]

how to fix it please help me?

@SergelenOchir SergelenOchir changed the title selectOrdinal selectOrdinal error Apr 9, 2024
@thekip
Copy link
Collaborator

thekip commented Apr 9, 2024

Please follow the issue template. And show the stacktrace of the issue. Does just t`Hello` works?

@SergelenOchir
Copy link
Author

Please follow the issue template. And show the stacktrace of the issue. Does just t`Hello` works?

Yeah it works

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants