예제 #1
0
        // ~~

        public virtual TRANSLATION Kings(
            TRANSLATION count_translation
            )
        {
            TRANSLATION
                result_translation = new TRANSLATION();

            result_translation.SetText("reyes");
            result_translation.SetQuantity(count_translation.Quantity);
            result_translation.SetGenre(GENRE.Male);

            return(result_translation);
        }
예제 #2
0
        // ~~

        public virtual TRANSLATION GetInverseTranslation(
            TRANSLATION value_translation
            )
        {
            TRANSLATION
                result_translation = new TRANSLATION();

            result_translation.SetQuantity(value_translation.Quantity);
            result_translation.SetText("one over " + value_translation.Text);
            result_translation.SetGenre(value_translation.Genre);

            return(result_translation);
        }
예제 #3
0
        // ~~

        public override TRANSLATION Swords(
            TRANSLATION count_translation
            )
        {
            TRANSLATION
                result_translation = new TRANSLATION();

            if (count_translation.GetEnglishCardinalPlurality() == PLURALITY.One)
            {
                result_translation.AddText("sword");
            }
            else
            {
                result_translation.AddText("swords");
            }

            result_translation.SetQuantity(count_translation.Quantity);

            return(result_translation);
        }
예제 #4
0
        // ~~

        public override TRANSLATION Helmets(
            int count
            )
        {
            TRANSLATION
                result_translation = new TRANSLATION();

            if (count == 1)
            {
                result_translation.AddText("helmet");
            }
            else
            {
                result_translation.AddText("helmets");
            }

            result_translation.SetQuantity(count);

            return(result_translation);
        }
예제 #5
0
        // ~~

        public override TRANSLATION Swords(
            TRANSLATION count_translation
            )
        {
            TRANSLATION
                result_translation = new TRANSLATION();

            if (count_translation.IntegerQuantity <= 1)
            {
                result_translation.AddText("espada");
            }
            else
            {
                result_translation.AddText("espadas");
            }

            result_translation.SetQuantity(count_translation.Quantity);
            result_translation.SetGenre(GENRE.Female);

            return(result_translation);
        }
예제 #6
0
        // ~~

        public override TRANSLATION Helmets(
            int count
            )
        {
            TRANSLATION
                result_translation = new TRANSLATION();

            if (count <= 1)
            {
                result_translation.AddText("yelmo");
            }
            else
            {
                result_translation.AddText("yelmos");
            }

            result_translation.SetQuantity(count);
            result_translation.SetGenre(GENRE.Male);

            return(result_translation);
        }
예제 #7
0
        // ~~

        public override TRANSLATION Swords(
            TRANSLATION count_translation
            )
        {
            TRANSLATION
                result_translation = new TRANSLATION();

            if (count_translation.GetFrenchCardinalPlurality() == PLURALITY.One)
            {
                result_translation.AddText("épée");
            }
            else
            {
                result_translation.AddText("épées");
            }

            result_translation.SetQuantity(count_translation.Quantity);
            result_translation.SetGenre(GENRE.Female);

            return(result_translation);
        }
예제 #8
0
        // ~~

        public virtual string Test(
            )
        {
            TRANSLATION
                no_helmets_translation = new TRANSLATION(),
                one_helmet_translation = new TRANSLATION(),
                kings_translation      = new TRANSLATION(),
                queens_translation     = new TRANSLATION(),
                princes_translation    = new TRANSLATION(),
                result_translation     = new TRANSLATION();

            no_helmets_translation = Helmets(0);
            one_helmet_translation = Helmets(1);
            result_translation.AddText(TheItemsHaveBeenFound(no_helmets_translation));
            result_translation.AddText(TheItemsHaveBeenFound(one_helmet_translation));
            result_translation.AddText(TheItemsHaveBeenFound(Helmets(2)));
            result_translation.AddText(TheItemsHaveBeenFound(NoSwords()));
            result_translation.AddText(TheItemsHaveBeenFound(OneSword()));
            result_translation.AddText(TheItemsHaveBeenFound(Swords(new TRANSLATION("", "2"))));
            result_translation.AddText(TestFunctions());
            result_translation.AddText(TestConditions(-25));
            result_translation.AddText(TestConditions(-15));
            result_translation.AddText(TestConditions(-5));
            result_translation.AddText(TestConditions(0));
            result_translation.AddText(TestConditions(5));
            result_translation.AddText(TestConditions(15));
            result_translation.AddText(TestConditions(25));
            kings_translation = Kings(new TRANSLATION("", "1"));
            queens_translation.SetText("reinas");
            queens_translation.SetQuantity("2");
            queens_translation.SetGenre(GENRE.Female);
            princes_translation = new TRANSLATION("príncipes", "3", GENRE.Male);
            result_translation.AddText(kings_translation.Text + " " + queens_translation.Text + " " + princes_translation.Text + "\n");

            return(result_translation.Text);
        }