Difference between revisions of "Helping With Documentation"

From GiderosMobile
(Marked this version for translation)
(added some tags doc)
(One intermediate revision by the same user not shown)
Line 1: Line 1:
<languages />
+
__NOTOC__
<translate><!--T:1-->
+
 
 
To help with documentation please contact one of the following members of the [http://giderosmobile.com/forum/ Gideros Forum] for access.  You will need to give them a valid e-mail address and be a trusted member of the forum.
 
To help with documentation please contact one of the following members of the [http://giderosmobile.com/forum/ Gideros Forum] for access.  You will need to give them a valid e-mail address and be a trusted member of the forum.
  
<!--T:11-->
 
 
For consistency all documentation should be in English, translations can then be made to other languages.
 
For consistency all documentation should be in English, translations can then be made to other languages.
  
<!--T:10-->
 
 
You cannot save edits or add translations until you have proper access.
 
You cannot save edits or add translations until you have proper access.
  
=== Forum members who can give you create/edit access to the documentation: === <!--T:2-->
+
=== Forum members who can give you create/edit access to the documentation: ===
</translate>
 
 
 
 
* @SinisterSoft
 
* @SinisterSoft
 
* @Hgy29
 
* @Hgy29
  
<translate>
+
== Editing a page and dealing with the translation system: ==
=== Editing a page and dealing with the translation system: === <!--T:3-->
 
 
 
<!--T:4-->
 
 
The system uses a markup system language to show things like headers, lists, etc.  Here is some help with how to use the markup language:
 
The system uses a markup system language to show things like headers, lists, etc.  Here is some help with how to use the markup language:
  
<!--T:5-->
 
 
https://www.mediawiki.org/wiki/Help:Formatting
 
https://www.mediawiki.org/wiki/Help:Formatting
  
<!--T:6-->
 
 
In the markup language documentation it shows internal links with double square brackets:
 
In the markup language documentation it shows internal links with double square brackets:
</translate>
 
  
 
''<nowiki>[[link to other page]]</nowiki>''
 
''<nowiki>[[link to other page]]</nowiki>''
  
<translate><!--T:12--> But because we have translation you have to do it a slightly different way:</translate>
+
But because we have translation you have to do it a slightly different way:
  
 
'' <nowiki>[[Special:MyLanguage/link to other page|<translate>link to other page</translate>]]</nowiki> ''
 
'' <nowiki>[[Special:MyLanguage/link to other page|<translate>link to other page</translate>]]</nowiki> ''
  
<translate><!--T:13--> This will pass along the language you see from one page to another and also mark the link text for translation.  If you have links within a block that is marked with a translate 'tag' then there is no need to also put the translate tag in the actual link (it's not allowed).</translate>
+
This will pass along the language you see from one page to another and also mark the link text for translation.  If you have links within a block that is marked with a translate 'tag' then there is no need to also put the translate tag in the actual link (it's not allowed).
 +
 
 +
Once a page has been made and it has the translate tags on it then you will see a 'mark for translation' link.
 +
 
 +
== SOME WIKI TAGS ==
 +
 
 +
======language related======
 +
<source lang="lua">
 +
  __TOC__
 +
  __NOTOC__
 +
  <languages/>
 +
  <translate><!--T:1--> your text. </translate>
 +
</source>
 +
 
 +
======file linking related======
 +
<source lang="lua">
 +
  <gallery widths=350px heights=250px perrow=1>
 +
  studio_1.png|
 +
  </gallery>
 +
 
 +
  [[File:Iphoneplayer.png]]
 +
</source>
 +
 
 +
'''<nowiki><source>GiderosiPhonePlayer.xcodeproj</source></nowiki>''' = to open a linked document
 +
 
 +
======text related======
 +
<source lang="lua">
 +
  * Bulleted list item
 +
  # Numbered list item
 +
  '''bold'''
 +
  &emsp; -- = TAB
 +
  ----- = draw a line
 +
  <br/> = line break
 +
</source>
 +
 
 +
======block related======
 +
<source lang="lua">
 +
  <div style="column-count:2;-moz-column-count:2;-webkit-column-count:2">
 +
      *<translate><!--T:6--> Android and iOS platform support</translate>
 +
  </div>
 +
 
 +
  <span line-height: 1.3em;">
 +
      {{Special:PrefixIndex/TextureBase.}}
 +
  </span>
 +
</source>
 +
 
 +
======gideros template related======
 +
<source lang="lua">
 +
  {{GIDEROS IMPORTANT LINKS}}
 +
  {{Gideros deco stars01}}
 +
</source>
 +
 
 +
 
 +
== TO ADD A CATEGORY TO THE LEFT MENU (ADVANCED/AUTHORIZED USERS ONLY) ==
 +
Create a category (for example: Plugins) then add this code to the new category:
 +
 
 +
<nowiki>[[Category:Reference Manual]]</nowiki>
 +
 
 +
Example:
 +
 
 +
<nowiki>https://wiki.giderosmobile.com/index.php?title=Category:Plugins</nowiki>
 +
 
 +
=== TO ADD LINKS TO A CATEGORY IN THE LEFT MENU ===
 +
Create a new category and add this code:
 +
*LUA API MENU ('''example'''):
 +
<source lang="lua">
 +
#REDIRECT [[Coroutine]]
 +
[[Category:Lua API]]
 +
</source>
 +
 
 +
*MAIN API MENU ('''example'''):
 +
<source lang="lua">
 +
#REDIRECT [[Accelerometer]]
 +
[[Category:Main API]]
 +
</source>
 +
 
 +
*PLUGINS MENU ('''example'''):
 +
<source lang="lua">
 +
#REDIRECT [[Ads]]
 +
[[Category:Plugins]]
 +
</source>
 +
 
 +
== TEMPLATES ==
 +
=== A - WHAT IS A TEMPLATE ===
 +
Templates can save duplicating work already done.
 +
 
 +
In our case, a template retrieves all the pages which start with a class name (for example all the pages which start with Bitmap).
 +
 
 +
This will be our navigation helper for when we navigate the wiki classes.
 +
 
 +
This will go at the bottom of every pages except the main class page which already contains all the methods (otherwise that will create duplicates).
 +
 
 +
=== B- TEMPLATE CREATION ===
 +
How do we create a template?
 +
 
 +
In the address bar type:
 +
<nowiki>https://wiki.giderosmobile.com/index.php?title=Template:</nowiki>
 +
 
 +
+ the name of the class you want to create a template for.
 +
 
 +
For example: <nowiki>https://wiki.giderosmobile.com/index.php?title=Template:R3d.World</nowiki>
 +
 
 +
'''That's it!'''
 +
 
 +
=== C- WHAT DOES A TEMPLATE PAGE CONTAIN? ===
 +
The template page can contain anything really.
 +
 
 +
In gideros we use it for easy navigation so we add links to other functions of the same class.
 +
 
 +
To do this we use the wikimedia function: '''<nowiki>{{Special:PrefixIndex/...}}</nowiki>'''
 +
 
 +
This will list all the pages starting with a given name. For example:
 +
 
 +
<nowiki>{{Special:PrefixIndex/Bitmap}}</nowiki>
 +
 
 +
=== D- A TYPICAL GIDEROS TEMPLATE ===
 +
<source lang="lua">
 +
 
 +
----
 +
{{Special:PrefixIndex/Bitmap}}
 +
 
 +
{{Gideros deco stars01}}
 +
 
 +
{{GIDEROS IMPORTANT LINKS}}
 +
 
 +
[[Category:Bitmap]]
 +
</source>
 +
 
 +
==== Let's describe an original gideros template ====
 +
*'''1st line''': a return character (ENTER) to add more room between the end of the function page and the navigation list of all related functions
 +
*'''2nd line''': <nowiki>----</nowiki> this add a nice formatted line
 +
*'''3rd line''': <nowiki>{{Special:PrefixIndex/...}}</nowiki> this will create a list of all the pages starting with a class name, ex: <nowiki>{{Special:PrefixIndex/Bitmap}}</nowiki>
 +
*'''4th line''': <nowiki><br/></nowiki> a line break
 +
*'''5th line''': a return character (ENTER)
 +
*'''6th line''': <nowiki>{{Gideros deco stars01}}</nowiki> this includes another template (gideros deco stars01). Its only purpose is to add some more deco. In this case another nicely formatted line <nowiki>(----)</nowiki> as seen above.
 +
 
 +
'''That's it!'''
 +
 
 +
====== SOME VARIATIONS OF A TYPICAL GIDEROS TEMPLATE ======
 +
<source lang="lua">
 +
{{Gideros deco stars01}}
 +
*********************************
 +
[[]]
 +
 +
<div style="column-count:3;-moz-column-count:3;-webkit-column-count:3">
 +
*some text here
 +
</div>
 +
<br/>
 +
</source>
 +
 
 +
=== E- TEMPLATE INTEGRATION ===
 +
Ok, we have created our template now we need to put it in every function pages of a particular class, at the very bottom of the page.
 +
 
 +
We include a template in a page using:
 +
<source lang="lua">
 +
{{templateName}}
 +
</source>
 +
 
 +
For example, we need to add the <nowiki>{{Bitmap}}</nowiki> template at the bottom of every function pages of the Bitmap class.
  
<translate><!--T:14--> Once a page has been made and it has the translate tags on it then you will see a 'mark for translation' link.</translate>
+
'''That's it!'''

Revision as of 04:31, 12 July 2020


To help with documentation please contact one of the following members of the Gideros Forum for access. You will need to give them a valid e-mail address and be a trusted member of the forum.

For consistency all documentation should be in English, translations can then be made to other languages.

You cannot save edits or add translations until you have proper access.

Forum members who can give you create/edit access to the documentation:

  • @SinisterSoft
  • @Hgy29

Editing a page and dealing with the translation system:

The system uses a markup system language to show things like headers, lists, etc. Here is some help with how to use the markup language:

https://www.mediawiki.org/wiki/Help:Formatting

In the markup language documentation it shows internal links with double square brackets:

[[link to other page]]

But because we have translation you have to do it a slightly different way:

[[Special:MyLanguage/link to other page|<translate>link to other page</translate>]]

This will pass along the language you see from one page to another and also mark the link text for translation. If you have links within a block that is marked with a translate 'tag' then there is no need to also put the translate tag in the actual link (it's not allowed).

Once a page has been made and it has the translate tags on it then you will see a 'mark for translation' link.

SOME WIKI TAGS

language related
   __TOC__ 
   __NOTOC__
   <languages/>
   your text.
file linking related
   <gallery widths=350px heights=250px perrow=1>
   studio_1.png|
   </gallery>

   [[File:Iphoneplayer.png]]

<source>GiderosiPhonePlayer.xcodeproj</source> = to open a linked document

text related
   * Bulleted list item
   # Numbered list item
   '''bold'''
   &emsp; -- = TAB
   ----- = draw a line
  <br/> = line break
block related
   <div style="column-count:2;-moz-column-count:2;-webkit-column-count:2">
      *Android and iOS platform support
   </div>

   <span line-height: 1.3em;">
      {{Special:PrefixIndex/TextureBase.}}
   </span>
gideros template related
   {{GIDEROS IMPORTANT LINKS}}
   {{Gideros deco stars01}}


TO ADD A CATEGORY TO THE LEFT MENU (ADVANCED/AUTHORIZED USERS ONLY)

Create a category (for example: Plugins) then add this code to the new category:

[[Category:Reference Manual]]

Example:

https://wiki.giderosmobile.com/index.php?title=Category:Plugins

TO ADD LINKS TO A CATEGORY IN THE LEFT MENU

Create a new category and add this code:

  • LUA API MENU (example):
#REDIRECT [[Coroutine]]
[[Category:Lua API]]
  • MAIN API MENU (example):
#REDIRECT [[Accelerometer]]
[[Category:Main API]]
  • PLUGINS MENU (example):
#REDIRECT [[Ads]]
[[Category:Plugins]]

TEMPLATES

A - WHAT IS A TEMPLATE

Templates can save duplicating work already done.

In our case, a template retrieves all the pages which start with a class name (for example all the pages which start with Bitmap).

This will be our navigation helper for when we navigate the wiki classes.

This will go at the bottom of every pages except the main class page which already contains all the methods (otherwise that will create duplicates).

B- TEMPLATE CREATION

How do we create a template?

In the address bar type: https://wiki.giderosmobile.com/index.php?title=Template:

+ the name of the class you want to create a template for.

For example: https://wiki.giderosmobile.com/index.php?title=Template:R3d.World

That's it!

C- WHAT DOES A TEMPLATE PAGE CONTAIN?

The template page can contain anything really.

In gideros we use it for easy navigation so we add links to other functions of the same class.

To do this we use the wikimedia function: {{Special:PrefixIndex/...}}

This will list all the pages starting with a given name. For example:

{{Special:PrefixIndex/Bitmap}}

D- A TYPICAL GIDEROS TEMPLATE

----
{{Special:PrefixIndex/Bitmap}}

{{Gideros deco stars01}}

{{GIDEROS IMPORTANT LINKS}}

[[Category:Bitmap]]

Let's describe an original gideros template

  • 1st line: a return character (ENTER) to add more room between the end of the function page and the navigation list of all related functions
  • 2nd line: ---- this add a nice formatted line
  • 3rd line: {{Special:PrefixIndex/...}} this will create a list of all the pages starting with a class name, ex: {{Special:PrefixIndex/Bitmap}}
  • 4th line: <br/> a line break
  • 5th line: a return character (ENTER)
  • 6th line: {{Gideros deco stars01}} this includes another template (gideros deco stars01). Its only purpose is to add some more deco. In this case another nicely formatted line (----) as seen above.

That's it!

SOME VARIATIONS OF A TYPICAL GIDEROS TEMPLATE
{{Gideros deco stars01}}
*********************************
[[]]
	
<div style="column-count:3;-moz-column-count:3;-webkit-column-count:3">
*some text here
</div>
<br/>

E- TEMPLATE INTEGRATION

Ok, we have created our template now we need to put it in every function pages of a particular class, at the very bottom of the page.

We include a template in a page using:

{{templateName}}

For example, we need to add the {{Bitmap}} template at the bottom of every function pages of the Bitmap class.

That's it!