Difference between revisions of "User:Kebap"

From Mudlet
Jump to navigation Jump to search
(→‎Projects: display Mudlet version picture thumbnail)
 
(25 intermediate revisions by the same user not shown)
Line 6: Line 6:
 
= Projects =
 
= Projects =
  
* [[User:Kebap/documentation-in-wiki]]
+
* [[User:Kebap/documentation-in-wiki]] - currently on hold
* Establish translations for Mudlet universe
+
** Standardize layout of [[Manual:Lua_Functions]] in [[Area 51]]
* [[User:Kebap/manual|New structure for wiki manual]]
 
  
 +
* [[User:Kebap/translation infrastructure|Establish translation-infrastructure for Mudlet universe]]
 +
** Create PR to clean up feedback from Crowdin - see [https://github.com/Mudlet/Mudlet/issues/1802 issue 1802]
 +
** Improve documentation for translators
 +
*** How to translate plural forms in crowdin
 +
** Improve documentation for developers
 +
*** How to handle special characters at start or end of translateable text
  
= Examples for Wiki formatting =
+
* Learn how to write working i18n style code for English hacks like "next %n time(s)"
 +
** QT documentation thereof: http://doc.qt.io/qt-5/i18n-source-translation.html#handling-plurals
  
==functionName==
+
* [[User:Kebap/Manual|New structure for wiki manual]]
;functionName(arg1, arg2)
 
: What the function does.
 
: Returns whatever the function returns.
 
: See also: [[Manual:Lua_Functions#paste|paste]]
 
<br/>
 
  
;Parameters
+
* Graphical overview of [[User:Kebap/Release dates|Release dates]]
* arg1:
+
[[File:Release_dates.png|thumb]]
: What arg1 is/does. Passed as a string.
 
* arg2:
 
: What arg2 is/does. Passed as a string.
 
<br/>
 
  
;Examples
+
* Add MorgenGrauen to Mudlet MUDs
<lua>
+
** review recommendations from [[Listing_Your_MUD]]
--a small example snippet of the function in action
+
 
--the comments up top should introduce it/explain what the snippet does
+
* <strike>Enable Discord group "Testers" to (de-)register themselves via Discord reactions</strike> done! :)
functionName("arg1", "arg2")
+
 
</lua>
+
* Create PR to clean up texts in source - see [https://github.com/Mudlet/Mudlet/issues/1801 github issue 1801]
 +
 
 +
* <strike>Learn how to make small PR like above with Smart Git instead of github web interface</strike> done! :)
 +
[[File:Commits201809.png|thumb|Me with a few buddies]]
 +
 
 +
* Improve Mudlet documentation, which is not interesting for Mudlet users, but only for (some) developers.
 +
** Including definitions on internal functions,
 +
** discussions and decisions on coding style conventions,
 +
** standard procedures like [[Release Checklist]], [[update lua function list]] for autocompletion,
 +
** This is done by adding Categories like "Mudlet Developer Manual" or "Mudlet Admin Manual"
 +
** etc.
 +
 
 +
* Look into improving a11y (accessibility) of Mudlet [https://github.com/Mudlet/Mudlet/issues?q=is%3Aopen+is%3Aissue+label%3Aa11y client] and [https://www.w3.org/TR/WCAG20/ website], etc.
 +
 
 +
* Learn more [[User:Kebap/git commands|git commands]]
 +
 
 +
= Examples for formatting =
 +
 
 +
== API documentation ==
 +
 
 +
Examples and description moved to [[Area 51]] plus template linked from there
 +
 
 +
== Standardized error messages in code ==
 +
 
 +
Old style, not very informative:
 +
<syntaxhighlight lang="cpp">
 +
    if (!lua_isnumber(L, 1)) {
 +
        lua_pushstring(L, "createMapLabel: wrong argument type");
 +
        return lua_error(L);
 +
    }
 +
    int area = lua_isnumber(L, 1);
 +
</syntaxhighlight>
 +
 
 +
New style with additional information:
 +
<syntaxhighlight lang="cpp">
 +
    if (!lua_isnumber(L, 1)) {
 +
        lua_pushfstring(L,
 +
                "createMapLabel: bad argument #1 type (areaID as number expected, got %s!)",
 +
                luaL_typename(L, 1));
 +
        return lua_error(L);
 +
    }
 +
    int area = lua_tointeger(L, 1);
 +
</syntaxhighlight>

Latest revision as of 23:03, 15 November 2022

About me

Mudlet user and script developer, hailing from MorgenGrauen (German).

Projects

Release dates.png
  • Enable Discord group "Testers" to (de-)register themselves via Discord reactions done! :)
  • Learn how to make small PR like above with Smart Git instead of github web interface done! :)
Me with a few buddies
  • Improve Mudlet documentation, which is not interesting for Mudlet users, but only for (some) developers.
    • Including definitions on internal functions,
    • discussions and decisions on coding style conventions,
    • standard procedures like Release Checklist, update lua function list for autocompletion,
    • This is done by adding Categories like "Mudlet Developer Manual" or "Mudlet Admin Manual"
    • etc.
  • Look into improving a11y (accessibility) of Mudlet client and website, etc.

Examples for formatting

API documentation

Examples and description moved to Area 51 plus template linked from there

Standardized error messages in code

Old style, not very informative:

    if (!lua_isnumber(L, 1)) {
        lua_pushstring(L, "createMapLabel: wrong argument type");
        return lua_error(L);
    }
    int area = lua_isnumber(L, 1);

New style with additional information:

    if (!lua_isnumber(L, 1)) {
        lua_pushfstring(L,
                "createMapLabel: bad argument #1 type (areaID as number expected, got %s!)",
                luaL_typename(L, 1));
        return lua_error(L);
    }
    int area = lua_tointeger(L, 1);