Commit 22ecf73e authored by Ruben Davila's avatar Ruben Davila

Adjust regex used in order to parse inline content.

e.g: %h4 {{ __('foo') }}

Problem was it was being parsed as: %h4 = _('foo')
And the correct content should be: %h4= _('foo')
parent b3c80094
var locales = locales || {}; locales['de'] = {"domain":"app","locale_data":{"app":{"":{"Project-Id-Version":"gitlab 1.0.0","Report-Msgid-Bugs-To":"","PO-Revision-Date":"2017-04-12 22:37-0500","Last-Translator":"FULL NAME <EMAIL@ADDRESS>","Language-Team":"German","Language":"de","MIME-Version":"1.0","Content-Type":"text/plain; charset=UTF-8","Content-Transfer-Encoding":"8bit","Plural-Forms":"nplurals=2; plural=n != 1;","lang":"de","domain":"app","plural_forms":"nplurals=2; plural=n != 1;"},"Commits":[""],"Cycle Analytics gives an overview of how much time it takes to go from idea to production in your project.":[""],"Deploys":[""],"Deutsch":[""],"English":[""],"First":[""],"Introducing Cycle Analytics":[""],"Last 30 days":[""],"Last 90 days":[""],"Limited to showing 50 events at most":[""],"Median":[""],"New Issues":[""],"Not available":[""],"Not enough data":[""],"Opened":[""],"Pipeline Health":[""],"Read more":[""],"Related Commits":[""],"Related Issues":[""],"Related Merge Requests":[""],"Relative Builds Trigger by Commits":[""],"Relative Deployed Builds":[""],"Relative Merged Requests":[""],"Showing %d event":["",""],"Spanish":[""],"Stage":[""],"The coding stage shows the time from the first commit to creating the merge request. The data will automatically be added here once you create your first merge request.":[""],"The collection of events added to the data gathered for that stage.":[""],"The issue stage shows the time it takes from creating an issue to assigning the issue to a milestone, or add the issue to a list on your Issue Board. Begin creating issues to see data for this stage.":[""],"The phase of the development lifecycle.":[""],"The planning stage shows the time from the previous step to pushing your first commit. This time will be added automatically once you push your first commit.":[""],"The production stage shows the total time it takes between creating an issue and deploying the code to production. The data will be automatically added once you have completed the full idea to production cycle.":[""],"The review stage shows the time from creating the merge request to merging it. The data will automatically be added after you merge your first merge request.":[""],"The staging stage shows the time between merging the MR and deploying code to the production environment. The data will be automatically added once you deploy to production for the first time.":[""],"The testing stage shows the time GitLab CI takes to run every pipeline for the related merge request. The data will automatically be added after your first pipeline finishes running.":[""],"The time taken by each data entry gathered by that stage.":[""],"The value lying at the midpoint of a series of observed values. E.g., between 3, 5, 9, the median is 5. Between 3, 5, 7, 8, the median is (5+7)/2 = 6.":[""],"Total Time":[""],"Want to see the data? Please ask administrator for access.":[""],"by":[""],"day":["",""],"hr":[""],"min":["",""],"pushed by":[""]}}}; var locales = locales || {}; locales['de'] = {"domain":"app","locale_data":{"app":{"":{"Project-Id-Version":"gitlab 1.0.0","Report-Msgid-Bugs-To":"","PO-Revision-Date":"2017-04-12 22:37-0500","Last-Translator":"FULL NAME <EMAIL@ADDRESS>","Language-Team":"German","Language":"de","MIME-Version":"1.0","Content-Type":"text/plain; charset=UTF-8","Content-Transfer-Encoding":"8bit","Plural-Forms":"nplurals=2; plural=n != 1;","lang":"de","domain":"app","plural_forms":"nplurals=2; plural=n != 1;"},"Commits":[""],"Cycle Analytics gives an overview of how much time it takes to go from idea to production in your project.":[""],"Deploys":[""],"Deutsch":[""],"English":[""],"First":[""],"Introducing Cycle Analytics":[""],"Last 30 days":[""],"Last 90 days":[""],"Limited to showing 50 events at most":[""],"Median":[""],"New Issues":[""],"Not available":[""],"Not enough data":[""],"Opened":[""],"Pipeline Health":[""],"Read more":[""],"Related Commits":[""],"Related Issues":[""],"Related Merge Requests":[""],"Relative Builds Trigger by Commits":[""],"Relative Deployed Builds":[""],"Relative Merged Requests":[""],"Showing %d event":["",""],"Spanish":[""],"Stage":[""],"The coding stage shows the time from the first commit to creating the merge request. The data will automatically be added here once you create your first merge request.":[""],"The collection of events added to the data gathered for that stage.":[""],"The issue stage shows the time it takes from creating an issue to assigning the issue to a milestone, or add the issue to a list on your Issue Board. Begin creating issues to see data for this stage.":[""],"The phase of the development lifecycle.":[""],"The planning stage shows the time from the previous step to pushing your first commit. This time will be added automatically once you push your first commit.":[""],"The production stage shows the total time it takes between creating an issue and deploying the code to production. The data will be automatically added once you have completed the full idea to production cycle.":[""],"The review stage shows the time from creating the merge request to merging it. The data will automatically be added after you merge your first merge request.":[""],"The staging stage shows the time between merging the MR and deploying code to the production environment. The data will be automatically added once you deploy to production for the first time.":[""],"The testing stage shows the time GitLab CI takes to run every pipeline for the related merge request. The data will automatically be added after your first pipeline finishes running.":[""],"The time taken by each data entry gathered by that stage.":[""],"The value lying at the midpoint of a series of observed values. E.g., between 3, 5, 9, the median is 5. Between 3, 5, 7, 8, the median is (5+7)/2 = 6.":[""],"Total Time":[""],"Want to see the data? Please ask administrator for access.":[""],"We don't have enough data to show this stage.":[""],"You need permission.":[""],"by":[""],"day":["",""],"hr":[""],"min":["",""],"pushed by":[""]}}};
\ No newline at end of file
var locales = locales || {}; locales['en'] = {"domain":"app","locale_data":{"app":{"":{"Project-Id-Version":"gitlab 1.0.0","Report-Msgid-Bugs-To":"","PO-Revision-Date":"2017-04-12 22:36-0500","Last-Translator":"FULL NAME <EMAIL@ADDRESS>","Language-Team":"English","Language":"en","MIME-Version":"1.0","Content-Type":"text/plain; charset=UTF-8","Content-Transfer-Encoding":"8bit","Plural-Forms":"nplurals=2; plural=n != 1;","lang":"en","domain":"app","plural_forms":"nplurals=2; plural=n != 1;"},"Commits":[""],"Cycle Analytics gives an overview of how much time it takes to go from idea to production in your project.":[""],"Deploys":[""],"Deutsch":[""],"English":[""],"First":[""],"Introducing Cycle Analytics":[""],"Last 30 days":[""],"Last 90 days":[""],"Limited to showing 50 events at most":[""],"Median":[""],"New Issues":[""],"Not available":[""],"Not enough data":[""],"Opened":[""],"Pipeline Health":[""],"Read more":[""],"Related Commits":[""],"Related Issues":[""],"Related Merge Requests":[""],"Relative Builds Trigger by Commits":[""],"Relative Deployed Builds":[""],"Relative Merged Requests":[""],"Showing %d event":["",""],"Spanish":[""],"Stage":[""],"The coding stage shows the time from the first commit to creating the merge request. The data will automatically be added here once you create your first merge request.":[""],"The collection of events added to the data gathered for that stage.":[""],"The issue stage shows the time it takes from creating an issue to assigning the issue to a milestone, or add the issue to a list on your Issue Board. Begin creating issues to see data for this stage.":[""],"The phase of the development lifecycle.":[""],"The planning stage shows the time from the previous step to pushing your first commit. This time will be added automatically once you push your first commit.":[""],"The production stage shows the total time it takes between creating an issue and deploying the code to production. The data will be automatically added once you have completed the full idea to production cycle.":[""],"The review stage shows the time from creating the merge request to merging it. The data will automatically be added after you merge your first merge request.":[""],"The staging stage shows the time between merging the MR and deploying code to the production environment. The data will be automatically added once you deploy to production for the first time.":[""],"The testing stage shows the time GitLab CI takes to run every pipeline for the related merge request. The data will automatically be added after your first pipeline finishes running.":[""],"The time taken by each data entry gathered by that stage.":[""],"The value lying at the midpoint of a series of observed values. E.g., between 3, 5, 9, the median is 5. Between 3, 5, 7, 8, the median is (5+7)/2 = 6.":[""],"Total Time":[""],"Want to see the data? Please ask administrator for access.":[""],"by":[""],"day":["",""],"hr":[""],"min":["",""],"pushed by":[""]}}}; var locales = locales || {}; locales['en'] = {"domain":"app","locale_data":{"app":{"":{"Project-Id-Version":"gitlab 1.0.0","Report-Msgid-Bugs-To":"","PO-Revision-Date":"2017-04-12 22:36-0500","Last-Translator":"FULL NAME <EMAIL@ADDRESS>","Language-Team":"English","Language":"en","MIME-Version":"1.0","Content-Type":"text/plain; charset=UTF-8","Content-Transfer-Encoding":"8bit","Plural-Forms":"nplurals=2; plural=n != 1;","lang":"en","domain":"app","plural_forms":"nplurals=2; plural=n != 1;"},"Commits":[""],"Cycle Analytics gives an overview of how much time it takes to go from idea to production in your project.":[""],"Deploys":[""],"Deutsch":[""],"English":[""],"First":[""],"Introducing Cycle Analytics":[""],"Last 30 days":[""],"Last 90 days":[""],"Limited to showing 50 events at most":[""],"Median":[""],"New Issues":[""],"Not available":[""],"Not enough data":[""],"Opened":[""],"Pipeline Health":[""],"Read more":[""],"Related Commits":[""],"Related Issues":[""],"Related Merge Requests":[""],"Relative Builds Trigger by Commits":[""],"Relative Deployed Builds":[""],"Relative Merged Requests":[""],"Showing %d event":["",""],"Spanish":[""],"Stage":[""],"The coding stage shows the time from the first commit to creating the merge request. The data will automatically be added here once you create your first merge request.":[""],"The collection of events added to the data gathered for that stage.":[""],"The issue stage shows the time it takes from creating an issue to assigning the issue to a milestone, or add the issue to a list on your Issue Board. Begin creating issues to see data for this stage.":[""],"The phase of the development lifecycle.":[""],"The planning stage shows the time from the previous step to pushing your first commit. This time will be added automatically once you push your first commit.":[""],"The production stage shows the total time it takes between creating an issue and deploying the code to production. The data will be automatically added once you have completed the full idea to production cycle.":[""],"The review stage shows the time from creating the merge request to merging it. The data will automatically be added after you merge your first merge request.":[""],"The staging stage shows the time between merging the MR and deploying code to the production environment. The data will be automatically added once you deploy to production for the first time.":[""],"The testing stage shows the time GitLab CI takes to run every pipeline for the related merge request. The data will automatically be added after your first pipeline finishes running.":[""],"The time taken by each data entry gathered by that stage.":[""],"The value lying at the midpoint of a series of observed values. E.g., between 3, 5, 9, the median is 5. Between 3, 5, 7, 8, the median is (5+7)/2 = 6.":[""],"Total Time":[""],"Want to see the data? Please ask administrator for access.":[""],"We don't have enough data to show this stage.":[""],"You need permission.":[""],"by":[""],"day":["",""],"hr":[""],"min":["",""],"pushed by":[""]}}};
\ No newline at end of file
This diff is collapsed.
require 'gettext_i18n_rails/haml_parser' require 'gettext_i18n_rails/haml_parser'
require 'gettext_i18n_rails_js/parser/javascript' require 'gettext_i18n_rails_js/parser/javascript'
VUE_TRANSLATE_REGEX = /{{ (N|n|s)?__\((.*)\) }}/ VUE_TRANSLATE_REGEX = /((%[\w.-]+)(?:\s))?{{ (N|n|s)?__\((.*)\) }}/
module GettextI18nRails module GettextI18nRails
class HamlParser class HamlParser
...@@ -15,7 +15,7 @@ module GettextI18nRails ...@@ -15,7 +15,7 @@ module GettextI18nRails
# #
# Overwrites: https://github.com/grosser/gettext_i18n_rails/blob/8396387a431e0f8ead72fc1cd425cad2fa4992f2/lib/gettext_i18n_rails/haml_parser.rb#L9 # Overwrites: https://github.com/grosser/gettext_i18n_rails/blob/8396387a431e0f8ead72fc1cd425cad2fa4992f2/lib/gettext_i18n_rails/haml_parser.rb#L9
def self.convert_to_code(text) def self.convert_to_code(text)
text.gsub!(VUE_TRANSLATE_REGEX, "= \\1_(\\2)") text.gsub!(VUE_TRANSLATE_REGEX, "\\2= \\3_(\\4)")
old_convert_to_code(text) old_convert_to_code(text)
end end
......
...@@ -136,6 +136,12 @@ msgstr "" ...@@ -136,6 +136,12 @@ msgstr ""
msgid "Want to see the data? Please ask administrator for access." msgid "Want to see the data? Please ask administrator for access."
msgstr "" msgstr ""
msgid "We don't have enough data to show this stage."
msgstr ""
msgid "You need permission."
msgstr ""
msgid "by" msgid "by"
msgstr "" msgstr ""
......
...@@ -136,6 +136,12 @@ msgstr "" ...@@ -136,6 +136,12 @@ msgstr ""
msgid "Want to see the data? Please ask administrator for access." msgid "Want to see the data? Please ask administrator for access."
msgstr "" msgstr ""
msgid "We don't have enough data to show this stage."
msgstr ""
msgid "You need permission."
msgstr ""
msgid "by" msgid "by"
msgstr "" msgstr ""
......
...@@ -7,7 +7,7 @@ msgid "" ...@@ -7,7 +7,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: gitlab 1.0.0\n" "Project-Id-Version: gitlab 1.0.0\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2017-04-26 20:01-0500\n" "PO-Revision-Date: 2017-04-27 11:45-0500\n"
"Language-Team: Spanish\n" "Language-Team: Spanish\n"
"Language: es\n" "Language: es\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
...@@ -139,6 +139,12 @@ msgstr "Tiempo Total" ...@@ -139,6 +139,12 @@ msgstr "Tiempo Total"
msgid "Want to see the data? Please ask administrator for access." msgid "Want to see the data? Please ask administrator for access."
msgstr "¿Quieres ver los datos? Por favor pedir acceso al administrador." msgstr "¿Quieres ver los datos? Por favor pedir acceso al administrador."
msgid "We don't have enough data to show this stage."
msgstr "No hay suficientes datos para mostrar en esta etapa."
msgid "You need permission."
msgstr "Necesitas permisos."
msgid "by" msgid "by"
msgstr "por" msgstr "por"
......
...@@ -137,6 +137,12 @@ msgstr "" ...@@ -137,6 +137,12 @@ msgstr ""
msgid "Want to see the data? Please ask administrator for access." msgid "Want to see the data? Please ask administrator for access."
msgstr "" msgstr ""
msgid "We don't have enough data to show this stage."
msgstr ""
msgid "You need permission."
msgstr ""
msgid "by" msgid "by"
msgstr "" msgstr ""
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment