Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upSemantic Comments Proposal: Variables #140
Comments
stasm
added this to To do
in Syntax 0.8
via automation
Jun 29, 2018
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
zbraniecki commentedJun 1, 2018
This is part of the series of proposals spanning out of the meta #16.
Variables
One of the core elements of the Fluent ecosystem is a model of passing a set of variables from the developer to localizer enabling the localizer to augument their translation.
Establishing a semantic way of describing the variables available to the localizer would help localization tools, checks and localizers themselves better understand the context in which they operate.
It would be especially beneficial for Rich Editor in Pontoon to provide better UX when operating on variables, and for checks to be able to raise warnings on misuse of the variables.
Variables can be considered part of #139, but they're such a core feature that I'd like to discuss them separately for two reasons:
First, being the most common and omnipresent example of a semantic information they should drive the whole conversation and we should design the meta-information model specifically taking into account this use case over others.
Secondly, because they're so dominant, we may want to consider separating them out of meta information and providing further syntax sugar to make them easier to work with.
So, as part of meta-information they could be represented as:
but since we know that
$sygil denotes a variable, we may want to provide additional syntax sugar to reduce the visual clutter:It then could be visually represented in Pontoon as:
and linters would be able to determine use and misuse of variables and warn about unused variables if needed.