public PlayerHistoryDialog(ITranslations translations, PlayerHistory history) : base(translations, "PlayerHistoryDialog.ui", "playerhistory") { string intro, built; intro = Catalog.GetString ("The graph below shows the player's game score evolution."); if (history.Games.Count < 2) { built = Catalog.GetString ("You need more than one game session recorded to see the score evolution."); } else { built = String.Format (Catalog.GetPluralString ("It is built using the results of {0} recorded game session.", "It is built using the results of the last {0} recorded game sessions.", history.Games.Count), history.Games.Count); } // Translators: "The graph below" + "It is built using" sentences label_playerhistory.Text = String.Format (Catalog.GetString ("{0} {1}"), intro, built); drawing_area = new CairoPreview (translations, history); drawing_area.SetSizeRequest (history_preview.WidthRequest, history_preview.HeightRequest); history_preview.Add (drawing_area); drawing_area.Visible = true; checkbutton_total.Label = Catalog.GetString ("Total"); checkbutton_logic.Label = GameTypesDescription.GetLocalized (translations, GameTypes.LogicPuzzle); checkbutton_calculation.Label = GameTypesDescription.GetLocalized (translations, GameTypes.Calculation); checkbutton_memory.Label = GameTypesDescription.GetLocalized (translations, GameTypes.Memory); checkbutton_verbal.Label = GameTypesDescription.GetLocalized (translations, GameTypes.VerbalAnalogy); checkbutton_total.Active = checkbutton_memory.Active = checkbutton_logic.Active = checkbutton_calculation.Active = checkbutton_verbal.Active = true; }
public PlayerHistoryDialog(ITranslations translations, PlayerHistory history) : base(translations, "PlayerHistoryDialog.ui", "playerhistory") { string intro, built; intro = Catalog.GetString("The graph below shows the player's game score evolution."); if (history.Games.Count < 2) { built = Catalog.GetString("You need more than one game session recorded to see the score evolution."); } else { built = String.Format(Catalog.GetPluralString("It is built using the results of {0} recorded game session.", "It is built using the results of the last {0} recorded game sessions.", history.Games.Count), history.Games.Count); } // Translators: "The graph below" + "It is built using" sentences label_playerhistory.Text = String.Format(Catalog.GetString("{0} {1}"), intro, built); drawing_area = new CairoPreview(translations, history); drawing_area.SetSizeRequest(history_preview.WidthRequest, history_preview.HeightRequest); history_preview.Add(drawing_area); drawing_area.Visible = true; checkbutton_total.Label = Catalog.GetString("Total"); checkbutton_logic.Label = GameTypesDescription.GetLocalized(translations, GameTypes.LogicPuzzle); checkbutton_calculation.Label = GameTypesDescription.GetLocalized(translations, GameTypes.Calculation); checkbutton_memory.Label = GameTypesDescription.GetLocalized(translations, GameTypes.Memory); checkbutton_verbal.Label = GameTypesDescription.GetLocalized(translations, GameTypes.VerbalAnalogy); checkbutton_total.Active = checkbutton_memory.Active = checkbutton_logic.Active = checkbutton_calculation.Active = checkbutton_verbal.Active = true; }