Strings ending on "%s

Some strings end with the sequence: "%s
Shouldn't they include a " in the end?


  • Why would it be required, as such strings are retrieved from the source code..?

    Your URL link didn't show examples, here are some:"%s&sfields=source,target

    Follow the same pattern and it should be fine.

  • Here is an example.
    In taoQtiItem in the model/QtiItemCompiler.php-file, we have e.g.:
    Lines 201-205:

    common_report_Report::TYPE_SUCCESS, __('Successfully compiled "%s"', $language)
            } catch (\tao_models_classes_FileNotFoundException $e) {
                return new common_report_Report(
                    common_report_Report::TYPE_ERROR, __('Unable to retrieve asset "%s"', $e->getFilePath())

    In the messages.po-file, the texts have been changed to:

    lines 1570 and 2037:

    msgid "Successfully compiled \"%s"
    msgid "Unable to retrieve asset \"%s"

    As you see, the last " has been removed.
    1. This could lead to two things: The string is not recognized, and gettext does not replace it.
    2. The " is always placed last in the string - and when the target language would move "%s" somewhere else in the sentence, it is presented wrongly.

    This seems to be a problem with the script extracting the strings.

    Best regards,

Sign In or Register to comment.

We use cookies on our website to support technical features that enhance your user experience. Cookie Policy Privacy Policy