Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Commit

Permalink
refactor code as suggested
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex Eng committed Jul 16, 2013
1 parent 521a30e commit ddb3a3b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
Expand Up @@ -219,8 +219,8 @@ public void refreshStatistic()
{
HProjectIteration iteration = projectIterationDAO.getBySlug(this.projectSlug, this.iterationSlug);

List<HLocale> locale = this.getDisplayLocales();
String[] localeIds = getLocaleIds(locale);
List<HLocale> localeList = this.getDisplayLocales();
String[] localeIds = getLocaleIds(localeList);

ContainerTranslationStatistics iterationStats = statisticsServiceImpl.getStatistics(this.projectSlug, this.iterationSlug, false, true, localeIds);

Expand All @@ -234,19 +234,19 @@ public void refreshStatistic()
total = projectIterationDAO.getTotalCountForIteration(iteration.getId());
}

for (HLocale var : locale)
for (HLocale locale : localeList)
{
TranslationStatistics stats = iterationStats.getStats(var.getLocaleId().getId(), statsOption);
TranslationStatistics stats = iterationStats.getStats(locale.getLocaleId().getId(), statsOption);
if (stats == null)
{
stats = new TranslationStatistics(statsOption);
stats.setUntranslated(total);
// stats.setTotal(total);
}

if (statsMap.containsKey(var.getLocaleId()))
if (statsMap.containsKey(locale.getLocaleId()))
{
statsMap.get(var.getLocaleId()).setStats(stats);
statsMap.get(locale.getLocaleId()).setStats(stats);
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions zanata-war/src/main/resources/messages.properties
Expand Up @@ -343,7 +343,7 @@ jsf.iteration.files.translateDenied.NotLoggedIn=You are not logged In.
jsf.iteration.files.translateDenied.VersionIsReadOnly=This project version is Read-Only.
jsf.iteration.files.translateDenied.VersionIsObsolete=This project version is Obsolete.
! {0} is a language name
jsf.iteration.files.translateDenied.UserNotTranslatorInLanguageTeam=You are not translator of the {0} language team.
jsf.iteration.files.translateDenied.UserNotTranslatorInLanguageTeam=You are a not translator of the {0} language team.
! {0} is a list of user roles
jsf.iteration.files.translateDenied.UserNotInProjectRole=You must be part of these user roles to translate this project: {0}

Expand Down Expand Up @@ -401,7 +401,7 @@ jsf.Loading=Loading...
jsf.AlreadyInTeam=Already in Team
jsf.Reviewer=Reviewer
jsf.Translator=Translator
jsf.RequestRoleAs=Request role in '#{sendEmail.locale.localeId.id}' language team as :
jsf.RequestRoleAs=Request the following roles in the '#{sendEmail.locale.localeId.id}' language team:


#------ [home] > Help ------
Expand Down

0 comments on commit ddb3a3b

Please sign in to comment.