21
Mamba
Re: XOOPS 2.5.x Translations using Transifex
  • 2012/4/30 8:24

  • Mamba

  • Moderator

  • Posts: 11366

  • Since: 2004/4/23


Quote:
Mamba, u or me will prepare the package ?

If you have some time, could you please do it? I am swamped at the moment

Quote:
And which translations u have to SVN?

I am not sure I understand your question...
Support XOOPS => DONATE
Use 2.5.10 | Docs | Modules | Bugs

22
Mazarin
Re: XOOPS 2.5.x Translations using Transifex
  • 2012/5/6 18:57

  • Mazarin

  • Just can't stay away

  • Posts: 533

  • Since: 2008/12/10


I'm happy to announce that a completely revised and bug fixed version of the Swedish translation is now available for XOOPS 2.5.5 in Transifex

23
irmtfan
Re: XOOPS 2.5.x Translations using Transifex
  • 2012/5/10 4:33

  • irmtfan

  • Module Developer

  • Posts: 3419

  • Since: 2003/12/7


Quote:

pirane wrote:
hi
i and persion tarnsliate team complet translate persion pleas attach this translite in to xoops
and
i started translit xoops modul

tanx


I corrected some persian translation.
1- in language/persian/calendar.php define("_CAL_FORMAT","Y-m-d"); it should not be translated to persian.
2- in language/persian/locale.php

@ Mamba and other core team:
some languages like persian and arabic need more local changes like RTL, hejira date and persian/arabic numbers.

Now with transifex how we can modify the locale.php more deeply.

please look at the official persian locale.php below:
<?php
/*
 You may not change or alter any portion of this comment or credits
 of supporting developers from this source code or any supporting source code 
 which is considered copyrighted (c) material of the original comment or credit authors.
 
 This program is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*/

/**
 * Xoops locale
 *
 * @copyright       The XOOPS project http://sourceforge.net/projects/xoops/
 * @license         http://www.fsf.org/copyleft/gpl.html GNU public license
 * @package         kernel
 * @since           2.3.0
 * @subpackage      Xoops Locale Language 
 * @author          Taiwen Jiang <phppp@users.sourceforge.net>
 * @version         $Id$
 * @todo            To be handled by i18n/l10n
 */
defined('XOOPS_ROOT_PATH') or die('Restricted access');

setlocale(LC_ALL'fa_IR');

// !!IMPORTANT!! insert '' before any char among reserved chars: "a", "A", "B", "c", "d", "D", "F", "g", "G", "h", "H", "i", "I", "j", "l", "L", "m", "M", "n", "O", "r", "s", "S", "t", "T", "U", "w", "W", "Y", "y", "z", "Z"    
// insert double '' before 't', 'r', 'n'
define("_TODAY""امروز G:i:s");
define("_YESTERDAY""دیروز G:i:s");
define("_MONTHDAY""G:i:s l j F Y");
define("_YEARMONTHDAY""G:i l j F Y");
define("_JDF_USE_HEGIRADATE","1");

define("_ELAPSE""%s پیش");

define("_TIMEFORMAT_DESC""Valid formats: "s" - " _SHORTDATESTRING "; "m" - " _MEDIUMDATESTRING "; "l" - " _DATESTRING ";<br />".
                            
""c" or "custom" - format determined according to interval to present; "e" - Elapsed; "mysql" - Y-m-d H:i:s;<br />".
                            
"specified string - Refer to <a href="http://php.net/manual/en/function.date.php" rel="external">PHP manual</a>."
                            
);
//start add file for jalali calendar
include_once("date/jdf.php");
//end add file for jalali calendar
class XoopsLocal extends XoopsLocalAbstract
{
// start add jalali calendar for persian language 
    /*
    * Function to display formatted times in user timezone
    */
    
function formatTimestamp($time$format "l"$timeoffset null)
    {
        global 
$xoopsConfig$xoopsUser;
        
        
$format_copy $format;
        
$format strtolower($format);
        
        if (
$format == "rss" || $format == "r") {
            
$TIME_ZONE "";
            if (!empty(
$GLOBALS['xoopsConfig']['server_TZ'])) {
                
$server_TZ absintval$GLOBALS['xoopsConfig']['server_TZ'] * 3600.0 ) );
                
$prefix = ($GLOBALS['xoopsConfig']['server_TZ'] < 0) ?  " -" " +";
                
$TIME_ZONE $prefix date("Hi"$server_TZ);
            }
            
$date gmdate("D, d M Y H:i:s"intval($time)) . $TIME_ZONE;
            return 
$date;
        }
        
        if ( (
$format == "elapse" || $format == "e") && $time time() ) {
            
$elapse time() - $time;
            if ( 
$days floor$elapse / (24 3600) ) ) {
                
$num $days sprintf(_DAYS$days) : _DAY;
            } elseif ( 
$hours floor( ( $elapse % (24 3600) ) / 3600 ) ) {
                
$num $hours sprintf(_HOURS$hours) : _HOUR;
            } elseif ( 
$minutes floor( ( $elapse 3600 ) / 60 ) ) {
                
$num $minutes sprintf(_MINUTES$minutes) : _MINUTE;
            } else {
                
$seconds $elapse 60;
                
$num $seconds sprintf(_SECONDS$seconds) : _SECOND;
            }
            
$ret sprintf(_ELAPSE$num);
               return 
$ret;
        }
        
        
// disable user timezone calculation and use default timezone,
        // for cache consideration
        
if ($timeoffset === null) {
            
$timeoffset = ($xoopsConfig['default_TZ'] == '') ? '0.0' $xoopsConfig['default_TZ'];
        }
        
        
$usertimestamp xoops_getUserTimestamp($time$timeoffset);
        
        switch (
$format) {
        case 
's':
            
$datestring _SHORTDATESTRING;
            break;
            
        case 
'm':
            
$datestring _MEDIUMDATESTRING;
            break;
            
        case 
'mysql':
            
$datestring "Y-m-d H:i:s";
            break;
            
        case 
'l':
            
$datestring _DATESTRING;
            break;
            
        case 
'c':
        case 
'custom':
            static 
$current_timestamp$today_timestamp$monthy_timestamp;
            if (!isset(
$current_timestamp)) {
                
$current_timestamp xoops_getUserTimestamp(time(), $timeoffset);
            }
            if (!isset(
$today_timestamp)) {
                
$today_timestamp mktime(000date("m"$current_timestamp), date("d"$current_timestamp), date("Y"$current_timestamp));
            }
            
            if ( 
abs($elapse_today $usertimestamp $today_timestamp) < 24*60*60 ) {
                
$datestring = ($elapse_today 0) ? _TODAY _YESTERDAY;
            } else {
                if (!isset(
$monthy_timestamp)) {
                    
$monthy_timestamp[0] = mktime(00000date("Y"$current_timestamp));
                    
$monthy_timestamp[1] = mktime(00000date("Y"$current_timestamp) + 1);
                }
                if (
$usertimestamp >= $monthy_timestamp[0] && $usertimestamp $monthy_timestamp[1]) {
                    
$datestring _MONTHDAY;
                } else {
                    
$datestring _YEARMONTHDAY;
                }
            }
            break;
            
        default:
            if (
$format != '') {
                
$datestring $format_copy;
            } else {
                
$datestring _DATESTRING;
            }
            break;
        }
    
// Start hacked by irmtfan for show hegira date in persian and other languages www.jadoogaran.org
    
if (_JDF_USE_HEGIRADATE && $format != 'mysql' ){
         return 
ucfirst(jdate($datestring,$usertimestamp));
       } else {
             return 
ucfirst(date($datestring,$usertimestamp));
           }
    
// End hacked by irmtfan for show hegira date in persian and other languages www.jadoogaran.org
    
}
// end add jalali calendar for persian language 
    
function number_format($number)
    {
        return 
number_format($number2'.'',');
    }
    
    function 
money_format($format$number)
    {
        
setlocale(LC_MONETARY'fa_IR');
        return 
money_format($format$number);
    }
}
?>


you can see we add jalali date and persian numbers.


thanks for your attention.

24
irmtfan
Re: XOOPS 2.5.x Translations using Transifex
  • 2012/5/12 8:29

  • irmtfan

  • Module Developer

  • Posts: 3419

  • Since: 2003/12/7


BUMP

what is the role of locale.php in the upcoming xoops versions after using transifex?

25
Mazarin
Re: XOOPS 2.5.x Translations using Transifex
  • 2012/5/13 20:28

  • Mazarin

  • Just can't stay away

  • Posts: 533

  • Since: 2008/12/10


How can we actually download any of the translations for 2.5.5? Can't find them on SourceForge.

26
DCrussader
Re: XOOPS 2.5.x Translations using Transifex

With Transifex client -http://help.transifex.com/features/client/
or
to tell me which pack is not ready so I can prepare it.

currently packaged files for XOOPS and modules -http://sourceforge.net/projects/gtlt/files/XOOPS/ - no idea if Mamba put them on X svn or not yet.

Quote:

Now with transifex how we can modify the locale.php more deeply.


You can't, locale.php must be provided separately
May The Source Be With You!

27
irmtfan
Re: XOOPS 2.5.x Translations using Transifex
  • 2012/5/14 6:27

  • irmtfan

  • Module Developer

  • Posts: 3419

  • Since: 2003/12/7


Quote:

You can't, locale.php must be provided separately

Ok then the core team should remove this file from transifex or just define another file like locale_lang?

Edit:
to Mamba:
did you send a request to transifex.net admins about changing the return method from windows CR+LF to linux LF?
if yes, what is their answer and their reasons for using windows return method?



28
Mazarin
Re: XOOPS 2.5.x Translations using Transifex
  • 2012/5/14 6:35

  • Mazarin

  • Just can't stay away

  • Posts: 533

  • Since: 2008/12/10


The Swedish translation is 100% complete but not packed.

I would suggest we start making the translation easily available to the community ASAP. No point in having them hidden away where people can't find or get to them.

29
Cesagonchu
Re: XOOPS 2.5.x Translations using Transifex

I sent private message to Mamba (around his birthday), the link to the French translation of XOOPS 2.5.5, but he did not put it on the sourceforge.

He is a very busy person

30
DCrussader
Re: XOOPS 2.5.x Translations using Transifex

Quote:

The Swedish translation is 100% complete but not packed.


It will be later today.
May The Source Be With You!

Login

Who's Online

220 user(s) are online (107 user(s) are browsing Support Forums)


Members: 0


Guests: 220


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Mar 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits