User:Jmarchn/Texts

Module:TNTTools

Contains functions linked to Module:TNT, which at the same time make calls to multilingual tables, located in Commons.

It has:
 * Question functions: with boolean or numerical indexed return. To be called from other modules or from templates. With:
 * Case sensitive option.
 * Possibility of more than one translated text value (where each value is separated by "|").
 * To put aside write, adding "I18n/" as a prefix and ".tab" extension as a suffix for the table names.
 * You can find examples of direct use from templates in:
 * TNTTools/Tests/GetStr
 * TNTTools/Tests/WordFound
 * TNTTools/Tests/WordIdx
 * TNTTools/Tests/WordIdxE

With Module:SimpleArgs allows get parameter values (passed from the frame) with several keys for the same parameter.

For example, with a parameter that has two or more meanings (or in English and localized language):

–

Module:SimpleArgs/doc

Used by other modules.

To translate or review the translation of the module to your language, edit carefully Data:I18n/Jmarchn.tab. Used by other modules.

To translate or review the translation of the module to your language, edit carefully Data:I18n/Jmarchn.tab.

Functions

 * Args are the arguments from the current frame.
 * Where is the name/s or order of the parameter.
 * The * mark indicates that it is an optional parameter).

Main

 * GetArgs (frame) - Returns arguments and its number.


 * p.ParamsSep = '/' - Variable used for next function.
 * ConcatParams (tab) - Used when a parameter has more one name for same parameter.

Numbers checking
They return the number N if this number are correct, otherwise returns an error message.
 * CheckNumIsInt (N, Where)
 * CheckNumIsPos (N, Where)
 * CheckNumIsZeroOrPos (N, Where)

Check if strings are numbers
They return a number if the string is a correct number, otherwise returns an error message.
 * CheckSIsNumber (S, Where, LimInf*, LimSup*)
 * CheckSIsInt (S, Where, LimInf*, LimSup*)
 * CheckSIsPosInt (S, Where, LimInf*, LimSup*)
 * CheckSIsZeroOrPosInt (S, Where, LimSup*)

Values from specific parameters of the frame
The functions with an initial R indicate that the parameter is required. They return the value of the requested type of the parameter if it is correct, otherwise they return an error message.
 * StrFromArgs (Args, Where, Default*)
 * RStrFromArgs (Args, Where, OKEmpty*)
 * CharFromArgs (Args, Where, Pattern, Default*)
 * RCharFromArgs (Args, Where, Pattern)
 * NulOrWhitespaceFromArgs (Args, Where)
 * StrChkTabFromArgs (Args, Where, Tab, Default*)
 * RStrChkTabFromArgs (Args, Where, Tab)
 * StrIdxChkTabFromArgs (Args, Where, Tab, Default*)
 * RStrIdxChkTabFromArgs (Args, Where, Tab)
 * NumberFromArgs (Args, Where, Default*, LimInf*, LimSup*)
 * RNumberFromArgs (Args, Where, LimInf*, LimSup*)
 * IntFromArgs (Args, Where, Default*, LimInf*, LimSup*)
 * RIntFromArgs (Args, Where, LimInf*, LimSup*)
 * PosIntFromArgs (Args, Where, Default*, LimInf*, LimSup*)
 * RPosIntFromArgs (Args, Where, LimInf*, LimSup*)
 * ZeroOrPosIntFromArgs (Args, Where, Default*, LimSup*)
 * RZeroOrPosIntFromArgs (Args, Where, LimSup*)
 * BoolFromArgs (Args, Where, Default*)
 * RBoolFromArgs (Args, Where, Default*)

Returning string or number tables
For the same parameter with items separated by Sep.
 * STabFromArgs (Args, Where, Sep, MinItemNum*, MaxItemNum*)
 * NumTabFromArgs (Args, Where, Sep, MinItemNum*, MaxItemNum*)
 * ZeroOrPosNumTabFromArgs (Args, Where, Sep, MinItemNum*, MaxItemNum*)
 * IntTabFromArgs (Args, Where, Sep, MinItemNum*, MaxItemNum*)
 * ZeroOrPosIntTabFromArgs (Args, Where, Sep, MinItemNum*, MaxItemNum*)
 * StrArgsFromPos (Args, NArgs, PosIni)

Frame functions
Used for multilingual templates, using Module:TNTTools.
 * FirstParamToBool (frame)
 * StrTNTF (frame)
 * FoundStrBoolTNTTabF (frame)
 * FoundStrNumTNTTabF (frame)
 * StrIdxChkTNTTabF (frame)
 * StrIdxChkTNTTabEF (frame)

–

If this module was only used in the English Wikipedia and was not needed for any other module or template it would not be necessary. But:


 * It is used, and therefore required, by Module:SimpleArgs. This last module is used by other modules (as I will explain in detail). And therefore it is necessary.
 * TNTTools takes functions of Module:TNT (developed by User:Yurik). TNT has not been eliminated, although it is not necessary for English Wikipedia. Although TNTTools does not come from Wikimedia, it's all a matter of time, I do not think that the TNTTools presence annoys somebody, just like the examples that I have put to take advantage of its operation (together with User:Amadalvarez).

Because the multilingual system?.

Since English Wikipedia contains pages, templates and modules that are copied to other Wikipedies, it would be nice to think over templates and modules in which the text to translate was separated of the template wikitext or program code. Text that is in Commons. This is the TNT system. This system facilitates translation to advanced users who are dedicated to this work, since they only have to translate the text of the table located in Commons, after copying the template or module unchanged.

I have also created sample files related to TNTTools (and SimpleArgs) and that you now also want to delete. If TNTTools should not be removed, the examples of your use should not be removed either.

---

What a template is simple is not a reason to be deleted, there are many templates that are simpler than this and that are very useful. I have added the documentation. My template does its function and enough. Do you want to give you examples of other simpler templates?

---

Module:SimpleArgs

SimpleArgs is very different of Arguments. I have created it precisely because there are many things that Arguments does not do. Although you have never created any module or you don't know how to program, you only have to look at the extension of the my module code (728 lines) in opposition to Arguments (342 lines) to recognize that they are very different. You can also look at the many examples I have added.

Also, SimpleArgs is necessary (required) for the other modules I have created. As you already know, just click on "What links here".

Finally, I also believe that SimpleArgs provides easier identification and verification of parameter values than Arguments. Another thing is that SimpleArgs can become popular.

---

Module:Multicol

This module is required by other of my modules (Module:ComplForColorModules).

I am improving this module so that it has two properties:
 * Automatic width of columns proportional to the width of the contents of each column.
 * Distribute the text of a list in several columns, without separate in two columns elements that have a nested list at the same time.
 * That you can enter text with TemplateData.

I uploaded it before it was upgraded to show you the utility of the other modules.

Template:BrewerPalette

You put the notice before I can upload it in other articles.

Finally, I already know that it is not particularly accessible, like many graphic elements that are in the wikipedia. I am very aware of the problems of vision. I am a physician, and years ago I created a blind typing program. I have a son and daughter ophthalmologists.

---

All these modules are designed primarily to completely renew Module:Chart by creating a column diagram, which will be much better than the Module:Graph column diagram. A preview can be viewed here: creating ca:Plantilla:Diagrama de columnes.