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

Commit

Permalink
Rename variables name
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex Eng committed Jul 17, 2013
1 parent 06ad061 commit ca4027a
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions zanata-war/src/main/java/org/zanata/action/ViewAllStatusAction.java
Expand Up @@ -256,8 +256,8 @@ public List<Status> getAllStatus()
{
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 @@ -271,15 +271,15 @@ public List<Status> getAllStatus()
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);

HTextFlowTarget lastTranslatedTarget = localeServiceImpl.getLastTranslated(projectSlug, iterationSlug, var.getLocaleId());
HTextFlowTarget lastTranslatedTarget = localeServiceImpl.getLastTranslated(projectSlug, iterationSlug, locale.getLocaleId());

if (lastTranslatedTarget != null)
{
Expand All @@ -290,16 +290,16 @@ public List<Status> getAllStatus()
}


if (!statsMap.containsKey(var.getLocaleId()))
if (!statsMap.containsKey(locale.getLocaleId()))
{
boolean isMember = authenticatedAccount != null ? personDAO.isUserInLanguageTeamWithRoles(authenticatedAccount.getPerson(), var, null, null, null) : false;
boolean isMember = authenticatedAccount != null ? personDAO.isUserInLanguageTeamWithRoles(authenticatedAccount.getPerson(), locale, null, null, null) : false;

Status op = new Status(var.getLocaleId().getId(), var.retrieveNativeName(), stats, isMember);
statsMap.put(var.getLocaleId(), op);
Status op = new Status(locale.getLocaleId().getId(), locale.retrieveNativeName(), stats, isMember);
statsMap.put(locale.getLocaleId(), op);
}
else
{
statsMap.get(var.getLocaleId()).setStats(stats);
statsMap.get(locale.getLocaleId()).setStats(stats);
}
}

Expand Down

0 comments on commit ca4027a

Please sign in to comment.