Comments (3)
Thanks for implementing this. Sorry to be late: apparently Github didn't notify me of the update.
from odin.
@Kelimion : thanks for looking at this. When you deal with this issue, you may look also at this discussion which may also involve API changes in the i18n.get()
family of calls.
from odin.
Btw, I implemented the MO parser referencing https://www.gnu.org/software/gettext/manual/html_node/MO-Files.html, without looking at any of their code (to avoid GPL contamination). But I had no example files with a so-called context.
So how should it work? Suppose we have the same key, with and without "Context".
msgctxt "Context"
msgid "Message1"
msgstr "This is message 1 with context"
msgid "Message1"
msgstr "This is message 1 without context"
I imagine that you want get("Message1")
to return This is message 1 without context
.
And if you supply the context, then it'd return This is message 1 with context
?
This could use get("section", "key")
mechanism where any key with a context uses that context string as the section name, and entries without a context end up in the ""
section.
from odin.
Related Issues (20)
- Compiler assertion for conversion from i32 to union{i32} HOT 1
- `core:odin/parser` package doesn't support putting labels on `#reverse for in` loops HOT 1
- Identity quaternion shows wrong value in debugger
- `linalg.angle_axis_from_quaternion` returns `[NaN, NaN, NaN]` axis for identity quaternion HOT 1
- `#force_*inline` after label segfaults HOT 1
- Poly code crashes compiler. HOT 1
- [Feature Request] add sqlite3 to vendor collection HOT 2
- Taking address of loop variable silently crashes compiler
- Odin diagnostics get messed up by non-ASCII codepoints HOT 4
- Unable to assign to `#soa` array using struct literal with named fields
- Incorrect hexadecimal literal is an invalid token HOT 1
- Compiler loops infinitely if error line is truncated HOT 1
- Infinite loop when compiling procedure with weird parapoly signature HOT 2
- Macos Intel crashes on calling `linalg.mul`
- Redeclaration of 'iso8601_to_time_utc' in this scope HOT 4
- some_var := -SOME_CONSTANT_VECTOR doesn't work
- `slice.unique` still returns incorrect slice HOT 2
- <spam>
- Compiler crashes with LLVM error HOT 3
- Clang won't be found if not aliased?
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 odin.