1,007
edits
Line 16: | Line 16: | ||
To make internationalization easier, all operations which are (human)-language-dependent are handled by language-specific plugins. For instance, in some languages the verb comes before the object, in other languages after the object, etc., so figuring out which part of the sentence is the verb is language-dependent. | To make internationalization easier, all operations which are (human)-language-dependent are handled by language-specific plugins. For instance, in some languages the verb comes before the object, in other languages after the object, etc., so figuring out which part of the sentence is the verb is language-dependent. | ||
There is a wiki page on [https://wiki.mozilla.org/Labs/Ubiquity/Ubiquity_0.1_Localization_Tutorial writing a language-specific plugin] which describes how these plugins work from the perspective of implementing one; information that's on that page won't be repeated here. | |||
See [https://ubiquity.mozilla.com/hg/ubiquity-firefox/file/71b710040206/ubiquity/modules/parser/parser.js#l65 NLParser.makeParserForLanguage() in parser.js] for how the parser chooses a particular language plugin to use; this is called on initialization. See [https://ubiquity.mozilla.com/hg/ubiquity-firefox/file/71b710040206/ubiquity/modules/parser/parser.js#l188 NLParser.Parser.updateSuggestionList() in parser.js] for how the parser dispatches the user input to the parser plugin. | See [https://ubiquity.mozilla.com/hg/ubiquity-firefox/file/71b710040206/ubiquity/modules/parser/parser.js#l65 NLParser.makeParserForLanguage() in parser.js] for how the parser chooses a particular language plugin to use; this is called on initialization. See [https://ubiquity.mozilla.com/hg/ubiquity-firefox/file/71b710040206/ubiquity/modules/parser/parser.js#l188 NLParser.Parser.updateSuggestionList() in parser.js] for how the parser dispatches the user input to the parser plugin. |
edits