Skip to content

Using pluralize with apostrophe #761

Description

@afinez

In some languages like french, the singular form can use an apostrophe but it raises an error in cli.
For instance :

nobjects <- 1
cli::pluralize("{nobjects} : l{?'/es }objet{?s} ")

raises

Erreur dans glue_data(.x = NULL, ..., .sep = .sep, .envir = .envir, .open = .open, : Unterminated quote (')

The expected output would be "1 : l'objet"

I was not able to find a way to escape the apostrophe correctly.

Note that

cli::pluralize("l'objet")

works so the problem seems to be linked with the "{? }" context.

Many thanks for this great package !

Activity

  1. added
    bugan unexpected problem or unintended behavior
    on Apr 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugan unexpected problem or unintended behavior

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions