Spanish translation and Displaying division

Status: finished.
This is a bugfix release with a limited set of new features.

Moderator: And_One

Rappia
Newbie
Posts: 4
Joined: Wed Sep 14, 2011 10:16 pm

Spanish translation and Displaying division

Postby Rappia » Sun Sep 18, 2011 2:10 am

Hey guys!

First of all I want to say GOOD JOB with this extension, you really did a great job on this!

I don't know if somebody is working on the spanish translation for this version of JL, I was translating by myself because I couldn't find the translation files. BTW due to my work and school I can't continue with this any more.

I'm posting here the work that had done, if someone wants to continue.

Also, I found the necessity to display the Division Name of each team on "Team Info -> History" so I modified the code in case that somebody need it

Just open the file "/com_joomleague/models/teaminfo.php" and search for these lines:

Code: Select all

$query = ' SELECT pt.id as ptid, pt.team_id, pt.picture, pt.info, pt.project_id AS projectid, '
              . ' p.name as projectname, pt.division_id, '
              . ' s.name as season, '
              . ' l.name as league, t.extended as teamextended, '
                 . ' CASE WHEN CHAR_LENGTH( p.alias ) THEN CONCAT_WS( \':\', p.id, p.alias ) ELSE p.id END AS project_slug, '
                 . ' CASE WHEN CHAR_LENGTH( t.alias ) THEN CONCAT_WS( \':\', t.id, t.alias ) ELSE t.id END AS team_slug '
              . ' FROM #__joomleague_project_team AS pt '
              . ' INNER JOIN #__joomleague_team AS t ON t.id = pt.team_id '
              . ' INNER JOIN #__joomleague_project AS p ON p.id = pt.project_id '
              . ' INNER JOIN #__joomleague_season AS s ON s.id = p.season_id '
              . ' INNER JOIN #__joomleague_league AS l ON l.id = p.league_id '
              . ' WHERE pt.team_id = '.(int)$this->teamid
              . ' AND p.published = 1 '
              . ' ORDER BY s.ordering '.$season_ordering;


and remplace with these:

Code: Select all

$query = ' SELECT pt.id as ptid, pt.team_id, pt.picture, pt.info, pt.project_id AS projectid, '
              . ' p.name as projectname, pt.division_id, '
              . ' s.name as season, '
                   . ' d.shortname as divisionname,'
              . ' l.name as league, t.extended as teamextended, '
                 . ' CASE WHEN CHAR_LENGTH( p.alias ) THEN CONCAT_WS( \':\', p.id, p.alias ) ELSE p.id END AS project_slug, '
                 . ' CASE WHEN CHAR_LENGTH( t.alias ) THEN CONCAT_WS( \':\', t.id, t.alias ) ELSE t.id END AS team_slug '
              . ' FROM #__joomleague_project_team AS pt '
              . ' INNER JOIN #__joomleague_team AS t ON t.id = pt.team_id '
              . ' INNER JOIN #__joomleague_project AS p ON p.id = pt.project_id '
              . ' INNER JOIN #__joomleague_season AS s ON s.id = p.season_id '
              . ' INNER JOIN #__joomleague_league AS l ON l.id = p.league_id '
                   . ' INNER JOIN #__joomleague_division AS d ON d.id = pt.division_id '
              . ' WHERE pt.team_id = '.(int)$this->teamid
              . ' AND p.published = 1 '
              . ' ORDER BY s.ordering '.$season_ordering;


Then open your file "/com_joomleague/views/teaminfo/tmpl/default_history.php" and search for these lines

Code: Select all

class="<?php echo ($k == 0)? 'sectiontableentry1' : 'sectiontableentry2'; ?>">
      <td><?php echo $season->season; ?></td>
      <td><?php echo $season->league; ?></td>


And then just add this line:

Code: Select all

<td><?php echo $season->divisionname; ?></td>


And that's all ;)

Please, forgive me if i'm posting on the wrong forum :P

Keep it up!!
You do not have the required permissions to view the files attached to this post.

margio
Newbie
Posts: 4
Joined: Thu Sep 22, 2011 4:53 am

Re: Spanish translation and Displaying division

Postby margio » Sun Sep 25, 2011 2:47 pm

Hola podrias ayudarme, esto que mencionas, me pasa cuando quiero publicar un menu de algun club o equipo pero no me deja seleccionar solo aparece el cuadro vacio y corto me puedes decir si como solucionarlo, es lo que mencionas arriba?

Saludos

Margio

And_One
Joomleague Project Manager, Donator
Joomleague Project Manager, Donator
Posts: 3609
Joined: Fri Sep 11, 2009 4:00 pm
Joomleague version: 2.0.x
Location: Graz
Contact:

Re: Spanish translation and Displaying division

Postby And_One » Tue Sep 27, 2011 1:48 pm

thx, added it to the repository!


Return to “1.5.2-sara (Beta 2)”

Who is online

Users browsing this forum: No registered users and 1 guest

cron