~anthonywong/sudoku-app/better-i18n

« back to all changes in this revision

Viewing changes to components/SudokuBlocksGrid.qml

  • Committer: Anthony Wong
  • Date: 2014-06-12 11:38:44 UTC
  • Revision ID: anthony.wong@canonical.com-20140612113844-bx0shv7xeqc9f5j9
BetterĀ i18n.

Show diffs side-by-side

added added

removed removed

Lines of Context:
449
449
                                        gameFinishedRectangle.visible = true;
450
450
                                        //Settings.insertNewScore(currentUserId, sudokuBlocksGrid.calculateScore())
451
451
                                        mainView.insertNewGameScore(currentUserId, sudokuBlocksGrid.calculateScore())
 
452
 
452
453
                                        if (checkIfCheating)
453
454
                                        {
454
 
                                            var _str = "points.";
455
 
                                            if (sudokuBlocksGrid.calculateScore() == 1)
456
 
                                                _str = "point."
457
 
                                            gameFinishedText.text = i18n.tr("You are a cheat...\nBut we give you\n")
458
 
                                                    + sudokuBlocksGrid.calculateScore()
459
 
                                                    + " " + i18n.tr(_str)
 
455
                                            gameFinishedText.text = i18n.tr("You are a cheat...\nBut we give you\n%1 point.",
 
456
                                                                            "You are a cheat...\nBut we give you\n%1 points.",
 
457
                                                                            sudokuBlocksGrid.calculateScore()).arg(sudokuBlocksGrid.calculateScore())
 
458
 
460
459
                                        }
461
460
                                        else
462
461
                                        {
463
 
                                            var _str = "points.";
464
 
                                            if (sudokuBlocksGrid.calculateScore() == 1)
465
 
                                                _str = "point."
466
 
                                            gameFinishedText.text = i18n.tr("Congratulations!\nWe give you\n")
467
 
                                                    + sudokuBlocksGrid.calculateScore()
468
 
                                                    + " " + i18n.tr(_str)
469
 
                                        }
 
462
                                            gameFinishedText.text = i18n.tr("Congratulations!\nWe give you\n%1 point.",
 
463
                                                                            "Congratulations!\nWe give you\n%1 points.",
 
464
                                                                            sudokuBlocksGrid.calculateScore()).arg(sudokuBlocksGrid.calculateScore())
 
465
                                        }                                        
470
466
 
471
467
                                        //print (sudokuBlocksGrid.numberOfActions)
472
468
                                        //print (sudokuBlocksGrid.numberOfHints)