def getstr(self, tag, key, default=None):
        """
            Get a translated string reference

            @param tag: the tag to wrap the string reference
            @param key: the key for the string
        """

        empty = False
        ref = "%s:%s" % (self.ref, key)

        translations = self._strings
        if ref in translations:
            string = translations[ref]
        elif default is not None:
            return default
        else:
            ref = None
            string = ""

        widget = TAG[str(tag)]

        if self.translate and ref:
            return widget(_ref="jr:itext('%s')" % ref)
        else:
            return widget(string)

# =============================================================================
dataset/ETHPy150Open sahana/eden/modules/s3/s3xforms.py/S3XFormsWidget.getstr/original