If I understand you correctly, I'm working on extending autotips to promotions, which should help a lot with that. I've had some people help me out with translations. In the unofficial patch you can take a look at these functions in InfoTooltipInclude.lua:
SetDefaultBuildingStatData
GetDefaultBuildingStatText
GetHelpTextForBuilding
I'm applying the same methods to promotions as I used for building tooltips. Very little of this stuff has translations, so I'm creating them in the
UP - Tips - Language...*.xml files.
It was a good find to discover names with a roman numeral are consistently leveled promotions. You might try something... one straightforward way to indicate which promotions are leveled is by adding that very stat to the promotions themselves. Something like:
ALTER TABLE UnitPromotions ADD PreviousLevel text default "";
Then scan through the database to set this for promotions with a previous level (using the roman numeral algorithm you devised, translated to sql). Separating the data from the primary lua code algorithms allows for
very easy lua statements like "if (promotion1.PreviousLevel == promotion2) then". Check out the buildingStats table in InfoTooltipInclude to see an example of this. On lines 136 and 175 are custom-added stats, "CulturePerPop" and "LocalPlotCultureCostModifier." The second one is the fix for the Krepost bug, both handled with things like pBuildingInfo.LocalPlotCultureCostModifier.
These custom stats are added in
UP - General.sql. I discovered it's also important database alterations like this be first in the load order.