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

Users are confused from unsupported plurals in Simple format #3394

Closed
JanCizmar opened this issue Oct 31, 2024 · 0 comments
Closed

Users are confused from unsupported plurals in Simple format #3394

JanCizmar opened this issue Oct 31, 2024 · 0 comments
Assignees

Comments

@JanCizmar
Copy link
Contributor

JanCizmar commented Oct 31, 2024

Users were repeatedly asking about the unsupported plurals when they follow our docs.

One was reporting this error:
image

I suggest

  1. to add comment to all integrations like this
import { Tolgee, DevTools, TolgeeProvider, FormatSimple } from "@tolgee/react";

const tolgee = Tolgee()
  .use(DevTools())
   // replace with .use(FormatIcu()) for rendering plurals, foramatted numbers, etc.
  .use(FormatSimple())
  .init({
    language: 'en',

    // for development
    apiUrl: process.env.VITE_APP_TOLGEE_API_URL,
    apiKey: process.env.VITE_APP_TOLGEE_API_KEY,

    // for production
    staticData: {
      ...
    }
  });

...

<TolgeeProvider
  tolgee={tolgee}
  fallback="Loading..." // loading fallback
>
  <App/>
</TolgeeProvider>
  1. Add hint to the parsing error
Forgot to use FormatIcu to render ICU message syntax?
  1. We should add multiple examples of valid messages to this doc page
    https://tolgee.io/js-sdk/formatting

  2. They should be informed that they use multiple formaters in the same time.

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