Example #1
0
        private static void outputDeJureInfo(StreamWriter writer, bool isKingdom, string title, string name, string adjective)
        {
            string prefix = "d";

            if (isKingdom)
            {
                prefix = "k";
            }
            string idName   = prefix + "_attila_" + title;
            string idAdj    = prefix + "_attila_" + title + "_adj";
            string lineName = LocalisationFormatter.format(idName, name);

            writer.WriteLine(lineName);
            string lineAdjective = LocalisationFormatter.format(idAdj, adjective);

            writer.WriteLine(lineAdjective);
        }
Example #2
0
        public static void output(FactionsInfo factionsInfo)
        {
            string outputFile = ImportantPaths.getOutputPath() + "\\localisation\\newTitles.csv";

            using (StreamWriter writer = File.CreateText(outputFile)) {
                writer.WriteLine(LocalisationFormatter.header());
                foreach (FactionInfo faction in factionsInfo.getFactions())
                {
                    if (faction.getCK2Title() == null)
                    {
                        continue;
                    }
                    outputNames(writer, faction);
                    outputAdjectives(writer, faction);
                }
            }
        }
        public static void outputCultureGroups(CultureMaps maps)
        {
            string outputFile = ImportantPaths.getOutputPath() + "\\localisation\\newGroupCultures.csv";

            using (StreamWriter writer = File.CreateText(outputFile)) {
                writer.WriteLine(LocalisationFormatter.header());
                foreach (var pair in maps.getCultureGroupMaps())
                {
                    string id      = pair.Key;
                    string english = "";
                    if (pair.Value.Count > 0)
                    {
                        english = pair.Value[0];
                    }
                    string line = LocalisationFormatter.format(id, english);
                    writer.WriteLine(line);
                }
            }
        }
Example #4
0
 private static void outputAdjectives(StreamWriter writer, FactionInfo faction)
 {
     //if (faction.getCK2Title() == "e_persia") return;
     if (faction.getIsNewTitle())
     {
         string id      = faction.getCK2Title() + "_adj";
         string english = faction.getAdjective();
         string line    = LocalisationFormatter.format(id, english);
         writer.WriteLine(line);
     }
     else
     {
         string id = "correction_" + faction.getCK2Title() + "_adj";
         id = id.ToUpper();
         string english = faction.getAdjective();
         string line    = LocalisationFormatter.format(id, english);
         writer.WriteLine(line);
     }
 }