Ejemplo n.º 1
0
 def test_double2(self):
     data = """
             :aria-label="open.publishing ? $gettext('Leave videochat') : $gettext('Join videochat')">
     """
     result = generate_po(data, self.path)
     self.assertIn('msgid "Leave videochat"', result)
     self.assertIn('msgid "Join videochat"', result)
Ejemplo n.º 2
0
 def test_double(self):
     data = """
             gettext("Lonely")
             gettext("Warrior")
     """
     result = generate_po(data, self.path)
     self.assertIn('msgid "Warrior"', result)
     self.assertIn('msgid "Lonely"', result)
Ejemplo n.º 3
0
 def test_widget2(self):
     data = """
             blockPage(Surfly.i18n.gettext('Cobrowsing session is opened in a separate tab.') + " " +
             Surfly.i18n.gettext('Please do not close this window while it is active.'),
     """
     result = generate_po(data, self.path)
     self.assertIn(
         'msgid "Cobrowsing session is opened in a separate tab."', result)
     self.assertIn(
         'msgid "Please do not close this window while it is active."',
         result)
Ejemplo n.º 4
0
 def test_double_string(self):
     data = """
 if (!this.options.ui_off && !this.$store.state.delayedEnd) {
     let msg = this.$gettext('You have an active cobrowsing session, are you sure you want to close this window?');
     e.returnValue = msg;
     return msg;
             }
     """
     result = generate_po(data, self.path)
     self.assertIn(
         'msgid "You have an active cobrowsing session, are you sure you want to close this window?"',
         result)
Ejemplo n.º 5
0
 def test_utf(self):
     data = """gettext("банана")"""
     expected = 'msgid "банана"'
     result = generate_po(data, self.path)
     self.assertIn(expected, result)
Ejemplo n.º 6
0
 def test_space(self):
     data = """gettext("Warrior")"""
     expected = 'msgid "Warrior"'
     result = generate_po(data, self.path)
     self.assertIn(expected, result)
Ejemplo n.º 7
0
 def test_widget(self):
     data = """blockPage(Surfly.i18n.gettext('Cobrowsing session is opened in a separate tab.') + " " +"""
     expected = 'msgid "Cobrowsing session is opened in a separate tab."'
     result = generate_po(data, self.path)
     self.assertIn(expected, result)
Ejemplo n.º 8
0
 def test_quotes(self):
     data = """gettext('H"O"T')"""
     expected = 'msgid "H"O"T"'
     result = generate_po(data, self.path)
     self.assertIn(expected, result)
Ejemplo n.º 9
0
 def test_sentence(self):
     data = """gettext('I want ice cream')"""
     expected = 'msgid "I want ice cream"'
     result = generate_po(data, self.path)
     self.assertIn(expected, result)
Ejemplo n.º 10
0
 def test_lonely_warrior_sq(self):
     data = """gettext('Warrior')"""
     expected = 'msgid "Warrior"'
     result = generate_po(data, self.path)
     self.assertIn(expected, result)