Fix bug #1103
parent
d5434c5c66
commit
66abe776d1
|
@ -30,7 +30,28 @@ module = angular.module("taigaCommon")
|
||||||
#############################################################################
|
#############################################################################
|
||||||
|
|
||||||
# TODO: fix when i18n is implemented
|
# TODO: fix when i18n is implemented
|
||||||
$i18next = {t: (key) -> key}
|
$i18next = {
|
||||||
|
t: (key) ->
|
||||||
|
keywords = {
|
||||||
|
"markdown-editor.heading-1": "First Level Heading",
|
||||||
|
"markdown-editor.heading-2": "Second Level Heading",
|
||||||
|
"markdown-editor.heading-3": "Third Level Heading",
|
||||||
|
"markdown-editor.bold": "Bold",
|
||||||
|
"markdown-editor.italic": "Italic",
|
||||||
|
"markdown-editor.strike": "Strike",
|
||||||
|
"markdown-editor.bulleted-list": "Bulleted List",
|
||||||
|
"markdown-editor.numeric-list": "Numeric List",
|
||||||
|
"markdown-editor.picture": "Picture",
|
||||||
|
"markdown-editor.link": "Link",
|
||||||
|
"markdown-editor.quotes": "Quotes",
|
||||||
|
"markdown-editor.code-block": "Code Block / Code",
|
||||||
|
"markdown-editor.preview": "Preview",
|
||||||
|
"markdown-editor.help": "Help",
|
||||||
|
"markdown-editor.placeholder": "Your title here...",
|
||||||
|
"markdown-editor.link-placeholder": "Your text to link here..."
|
||||||
|
}
|
||||||
|
return keywords[key] or key
|
||||||
|
}
|
||||||
|
|
||||||
tgMarkitupDirective = ($rootscope, $rs) ->
|
tgMarkitupDirective = ($rootscope, $rs) ->
|
||||||
previewTemplate = _.template("""
|
previewTemplate = _.template("""
|
||||||
|
@ -148,40 +169,40 @@ tgMarkitupDirective = ($rootscope, $rs) ->
|
||||||
|
|
||||||
markupSet: [
|
markupSet: [
|
||||||
{
|
{
|
||||||
name: $i18next.t('wiki-editor.heading-1')
|
name: $i18next.t('markdown-editor.heading-1')
|
||||||
key: "1"
|
key: "1"
|
||||||
placeHolder: $i18next.t('wiki-editor.placeholder')
|
placeHolder: $i18next.t('markdown-editor.placeholder')
|
||||||
closeWith: (markItUp) -> markdownTitle(markItUp, '=')
|
closeWith: (markItUp) -> markdownTitle(markItUp, '=')
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: $i18next.t('wiki-editor.heading-2')
|
name: $i18next.t('markdown-editor.heading-2')
|
||||||
key: "2"
|
key: "2"
|
||||||
placeHolder: $i18next.t('wiki-editor.placeholder')
|
placeHolder: $i18next.t('markdown-editor.placeholder')
|
||||||
closeWith: (markItUp) -> markdownTitle(markItUp, '-')
|
closeWith: (markItUp) -> markdownTitle(markItUp, '-')
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: $i18next.t('wiki-editor.heading-3')
|
name: $i18next.t('markdown-editor.heading-3')
|
||||||
key: "3"
|
key: "3"
|
||||||
openWith: '### '
|
openWith: '### '
|
||||||
placeHolder: $i18next.t('wiki-editor.placeholder')
|
placeHolder: $i18next.t('markdown-editor.placeholder')
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
separator: '---------------'
|
separator: '---------------'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: $i18next.t('wiki-editor.bold')
|
name: $i18next.t('markdown-editor.bold')
|
||||||
key: "B"
|
key: "B"
|
||||||
openWith: '**'
|
openWith: '**'
|
||||||
closeWith: '**'
|
closeWith: '**'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: $i18next.t('wiki-editor.italic')
|
name: $i18next.t('markdown-editor.italic')
|
||||||
key: "I"
|
key: "I"
|
||||||
openWith: '_'
|
openWith: '_'
|
||||||
closeWith: '_'
|
closeWith: '_'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: $i18next.t('wiki-editor.strike')
|
name: $i18next.t('markdown-editor.strike')
|
||||||
key: "S"
|
key: "S"
|
||||||
openWith: '~~'
|
openWith: '~~'
|
||||||
closeWith: '~~'
|
closeWith: '~~'
|
||||||
|
@ -190,37 +211,37 @@ tgMarkitupDirective = ($rootscope, $rs) ->
|
||||||
separator: '---------------'
|
separator: '---------------'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: $i18next.t('wiki-editor.bulleted-list')
|
name: $i18next.t('markdown-editor.bulleted-list')
|
||||||
openWith: '- '
|
openWith: '- '
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: $i18next.t('wiki-editor.numeric-list')
|
name: $i18next.t('markdown-editor.numeric-list')
|
||||||
openWith: (markItUp) -> markItUp.line+'. '
|
openWith: (markItUp) -> markItUp.line+'. '
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
separator: '---------------'
|
separator: '---------------'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: $i18next.t('wiki-editor.picture')
|
name: $i18next.t('markdown-editor.picture')
|
||||||
key: "P"
|
key: "P"
|
||||||
replaceWith: '![[![Alternative text]!]]([![Url:!:http://]!] "[![Title]!]")'
|
replaceWith: '![[![Alternative text]!]]([![Url:!:http://]!] "[![Title]!]")'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: $i18next.t('wiki-editor.link')
|
name: $i18next.t('markdown-editor.link')
|
||||||
key: "L"
|
key: "L"
|
||||||
openWith: '['
|
openWith: '['
|
||||||
closeWith: ']([![Url:!:http://]!] "[![Title]!]")'
|
closeWith: ']([![Url:!:http://]!] "[![Title]!]")'
|
||||||
placeHolder: $i18next.t('wiki-editor.link-placeholder')
|
placeHolder: $i18next.t('markdown-editor.link-placeholder')
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
separator: '---------------'
|
separator: '---------------'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: $i18next.t('wiki-editor.quotes')
|
name: $i18next.t('markdown-editor.quotes')
|
||||||
openWith: '> '
|
openWith: '> '
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: $i18next.t('wiki-editor.code-block')
|
name: $i18next.t('markdown-editor.code-block')
|
||||||
openWith: '```\n'
|
openWith: '```\n'
|
||||||
closeWith: '\n```'
|
closeWith: '\n```'
|
||||||
},
|
},
|
||||||
|
@ -228,7 +249,7 @@ tgMarkitupDirective = ($rootscope, $rs) ->
|
||||||
separator: '---------------'
|
separator: '---------------'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: $i18next.t('wiki-editor.preview')
|
name: $i18next.t('markdown-editor.preview')
|
||||||
call: preview
|
call: preview
|
||||||
className: "preview-icon"
|
className: "preview-icon"
|
||||||
},
|
},
|
||||||
|
@ -236,7 +257,7 @@ tgMarkitupDirective = ($rootscope, $rs) ->
|
||||||
# separator: '---------------'
|
# separator: '---------------'
|
||||||
# },
|
# },
|
||||||
# {
|
# {
|
||||||
# name: $i18next.t('wiki-editor.help')
|
# name: $i18next.t('markdown-editor.help')
|
||||||
# call: openHelp
|
# call: openHelp
|
||||||
# className: "help"
|
# className: "help"
|
||||||
# }
|
# }
|
||||||
|
|
|
@ -24,12 +24,8 @@
|
||||||
"rangecheck": "You must select between %s and %s choices.",
|
"rangecheck": "You must select between %s and %s choices.",
|
||||||
"equalto": "This value should be the same."
|
"equalto": "This value should be the same."
|
||||||
},
|
},
|
||||||
"pagination": {
|
|
||||||
"next": "Next",
|
|
||||||
"prev": "Previous"
|
|
||||||
},
|
|
||||||
"common": {
|
"common": {
|
||||||
"subject": "Subject"
|
"subject": "Subject",
|
||||||
"save": "Save",
|
"save": "Save",
|
||||||
"blocked": "Blocked",
|
"blocked": "Blocked",
|
||||||
"cancel": "Cancel",
|
"cancel": "Cancel",
|
||||||
|
@ -37,6 +33,28 @@
|
||||||
"new-bulk": "New bulk insert",
|
"new-bulk": "New bulk insert",
|
||||||
"one-item-line": "One item per line..."
|
"one-item-line": "One item per line..."
|
||||||
},
|
},
|
||||||
|
"pagination": {
|
||||||
|
"next": "Next",
|
||||||
|
"prev": "Previous"
|
||||||
|
},
|
||||||
|
"markdown-editor": {
|
||||||
|
"heading-1": "First Level Heading",
|
||||||
|
"heading-2": "Second Level Heading",
|
||||||
|
"heading-3": "Third Level Heading",
|
||||||
|
"bold": "Bold",
|
||||||
|
"italic": "Italic",
|
||||||
|
"strike": "Strike",
|
||||||
|
"bulleted-list": "Bulleted List",
|
||||||
|
"numeric-list": "Numeric List",
|
||||||
|
"picture": "Picture",
|
||||||
|
"link": "Link",
|
||||||
|
"quotes": "Quotes",
|
||||||
|
"code-block": "Code Block / Code",
|
||||||
|
"preview": "Preview",
|
||||||
|
"help": "Help",
|
||||||
|
"placeholder": "Your title here...",
|
||||||
|
"link-placeholder": "Your text to link here..."
|
||||||
|
},
|
||||||
"us": {
|
"us": {
|
||||||
"title-new": "New User Story",
|
"title-new": "New User Story",
|
||||||
"team-requirement": "Team Requirement",
|
"team-requirement": "Team Requirement",
|
||||||
|
|
Loading…
Reference in New Issue