Ejemplo n.º 1
0
 def identifier(self, lowerFirst=True):
     """
     Returns an untranslated name, usable as LilyPond identifier,
     with the first letter lowered by default.
     """
     name = self.__class__.__name__
     if lowerFirst:
         name = name[0].lower() + name[1:]
     if self.num:
         name += ly.romanize(self.num)
     return name
Ejemplo n.º 2
0
    def getInstrumentNames(self, names, num=0):
        """
        Returns a tuple (longname, shortname).

        names is a ki18n string with a pipe symbol separating the
        long and the short instrument name. (This way the abbreviated
        instrument names remain translatable).

        If num > 0, it is added to the instrument name (e.g. Violine II)
        """
        names = self.translate(names).split("|")
        if num:
            names = [name + " " + ly.romanize(num) for name in names]
        return names