Comments (13)
Generally speaking, JSDuck has no support for i18n. So far one other person has asked about this topic, regarding translating ExtJS docs to Japanese. Currently this is far from being a priority for us, but localizing API documentation is a tricky problem. So if you have any ideas, please elaborate.
from jsduck.
I want to use jsduck to gen my plugin's doc, and it will be public to my team(with zh_CN) and share to ext forum (with en), so I write 2 language doc in the js file, but wan't to public only one language with a cmd param.
or can jsduck offer a param : filterTagList
sorry for my poor english.
from jsduck.
As I said earlier, there's currently no support for something like this in JSDuck.
What should the filterTagList parameter do?
from jsduck.
I write different lang descript with tags, such as @en some xxxx @zh_CN xxxx
then I can run jsduck 2 times with different 'filterTagList ' param and got 2 lang docs
from jsduck.
Hmmm... Do I understand correctly, that you would expect it to work like this:
/**
* @en
* Either shows or hides the component.
* @param {Boolean} visible True to show, false to hide.
*
* @et
* Näitab või peidab komponendi.
* @param {Boolean} force True et näidata, false et peita.
*/
setVisibility: function(visible) {
And then one would run the jsduck with an option like --language=et or --language=en to get output in different languages?
from jsduck.
yes~
but as what you show... it sounds to ugly if had to write params docs many times... the source will be hard to read...
now I know that i18n is a real hard question.
thanks for reply.
from jsduck.
FYI: We might be having support for something like this coming. Something to conditionally turn a portion of doc-comment on or off. Not really for i18n purposes, but it could be used for that.
from jsduck.
@nene
hi. you said that you might be having support for something that conditionally turn a portion of doc-comment on or off. I wonder have you done that?
from jsduck.
Nope. That idea was not implemented.
from jsduck.
@nene
Are you going to implement?
from jsduck.
Unlikely.
from jsduck.
So that means there is no way to solve this problem using jsduck? we can't write annotations in different languages and then generate different documents?
from jsduck.
I suppose not.
I guess one could hack something in front of Markdown processor through which all the strings go. Export all the strings for translation. Translate them separately. Then map the original strings to translated versions. Kind'a similarly to the way how GNU Gettext works.
This all would be much easier though if in addition to JSON export, there would also be a proper JSON import, so one could take the exported JSON, translate that, and feed it back to JSDuck.
from jsduck.
Related Issues (20)
- Does sencha docs use a private tool now? HOT 1
- Simple HTML example showing glyph with JavaScript constant HOT 1
- Opening JSDuck via index.php breaks JSONP loading
- What is "description" doing in guides?
- Documentation coverage HOT 8
- windows executable listed as malicious HOT 1
- How to hide the Array Boolean item HOT 2
- JSDuck & ExtJS6 - Universal app. HOT 3
- cannot load such file --rubygems.rb HOT 2
- Error thrown when running HOT 2
- jsduck 6.0.0.beta does not support encoding gb2312? HOT 1
- jsduck: command not found HOT 1
- why @example tag can't show 'Code Editor' & 'Live Preview' btn? HOT 3
- why ckfinder not working on hosting HOT 2
- Custom "inline" tags for Guides HOT 2
- Have a way to prevent loading external resources HOT 2
- Why on code don't useing parse self-contained function HOT 1
- Archive & Alternatives HOT 1
- XSS Injection in JSDuck
- Oops...
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 jsduck.