Comments (11)
I'm totally fine with having this be a linter check.
from fluent.
One thing we're doing with tags is that we're taking them out of the data space that can be exposed publicly. You can't return the żeński to the calling program.
So I disagree that this is just a tooling feature.
from fluent.
Do we really need to enforce this level of protection in the runtime? I could see a linter rule which warns against interpolating attribute expressions on private messages (foo = { -brand-name.gender }
), but even then I think it should not be an error.
from fluent.
I strongly think that exposing language-internal traits is an error. We've had people try to abuse language-internal traits over and over, and I also think that making it clear on the syntax level that that's not OK is a win.
Sorry for using traits, but we're not using that word right now, so I use it to mean tags/attributes/something.
from fluent.
One cannot retrieve a private message from MessageContext, so the only way to someone could attempt to retrieve an attribute on a private message is via interpolation.
If that's the case, we could address Pike's concern by simply forbidding AttributeExpressions on private messages outside of SelectExpressions selector.
from fluent.
I disagree on "simply" :) There is a lot of conditions in forbid AttributeExpressions on private messages outside of SelectExpressions selector which makes this rule hard to internalize. I'd prefer to move this check into a linter.
The syntax should help localizers create good localizations without imposing too many strict rules. At any point a localizer can create a bad translation: they can write About { -brand-name.gender }
just as they can write About Totally Not Brand Name
. Not everything that parses must make immediate sense.
from fluent.
Do we really need to enforce this level of protection in the runtime?
Yes, we need to handle this at runtime. If it's legal syntax, people can and likely will put it in files, and we need to have defined runtime behavior.
Linters are things that we run optionally. Hopefully people run it, but we can't enforce that they do in any way.
from fluent.
Before we discuss the implementation in #69, I'd like to get sign-offs on this proposal from the majority of the core team. Please comment in this thread and tick the box next to your name if you give this proposal a green light.
from fluent.
r+
from fluent.
r+
from fluent.
We talked about this on the tech call yesterday, and zibi and I share the concern about runtime leakage, though we have different severities for it.
As we've seen folks try to do interesting stuff with hashes in l20n files, we'll want a runtime catch for this.
from fluent.
Related Issues (20)
- Resource namespace HOT 1
- Korean markers (조사. e.g. 은/는, 이/가, 을/를, 와/과, ...) support? HOT 2
- reusing terms to create more complex terms HOT 2
- Term's attributes can't be used as variable values HOT 2
- Term's attributes can't be used as placeable HOT 6
- `resolveVariableReference` enforces variables names to be own properties HOT 1
- Allow dots in message identifiers HOT 7
- Select expression breaks if you have dot character on the second line of any branch HOT 2
- Compiling fluent HOT 3
- Documentation on projectfluent.org is not updated HOT 1
- Let's reduce the gap between Fluent and MessageFormat 2
- EVAL builtin function
- Pass variables from app, to a fluent selector HOT 2
- Make `[]` legal in selector HOT 4
- Design a logo (square/circle) for *.ftl file associations HOT 3
- Qt (Linguist) support HOT 1
- Future of Fluent, MessageFormat 2, etc HOT 24
- Proper way to display ordinal numbers HOT 3
- Improve selector usages in the wiki HOT 1
- syntax guide seems to be down HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fluent.