accent
accent copied to clipboard
String descriptions and other metadata
Sometimes it's not clear from the string and its ID in what context it is used, especially if the strings are short and seem generic. Some file formats support comments in more or less structured fashion. We are using react-intl in our projects and it supports optional description for each string. We also sometimes include the path to the file where the string is used in the metadata (gives the translator additional context when filenames are somewhat meaningful). Do you have plans to allow some kind of description or metadata that would be displayed next to the string in the Accent UI?
Adding to this, I've uploaded a gettext / PO file with comments / metadata, and upon export this metadata is missing. If it could at least be preserved, until there is a nice way to show it in the UI, that would be great.
Indeed, maybe even a screenshot/URL where this translation is used would be nice. It seems that weblate is also doing this.
@simonprev I would really like to see the Source string location which is available as metadata in the .po files
Gettext comments have been added recently in the UI and are preserved in the export.
## From Ecto.Changeset.cast/4
msgid "can't be blank"
msgstr "ne peut être vide"
If there are other formats that we can extract comments and metadata, a new issue can be opened so we track progress 😃 And screenshots are a long time feature that we needs more thinking since Accent does not have a "storage" requirement yet, so no S3 or persisted filesystem to keep images.
And screenshots are a long time feature that we needs more thinking since Accent does not have a "storage" requirement yet, so no S3 or persisted filesystem to keep images.
Should I open a dedicated issue then where the thinking and discussing can be done?
I'm using react-intl / formatjs. By default it extract into a slightly extended JSON format like so:
{
"this-is-the-message-id": {
"defaultMessage": "foo",
"description": "helpful information for translators"
}
}
The format can be adjusted as needed, or even fully customized. I'm thinking of also outputting the path to the source file + lines where the string is, or even a link to GitHub, to make it easier to access the context.
Sadly Accent doesn't support this kind of JSON format yet. Would Accent be open to supporting such a flat format where values are not simple strings (as in simple_json) but objects that contain the message and associated metadata?