mirror of
https://github.com/KevinMidboe/linguist.git
synced 2025-10-29 17:50:22 +00:00
Merge branch 'master' into newlisp
This commit is contained in:
@@ -420,3 +420,5 @@ https://github.com/wmertens/sublime-nix:
|
|||||||
- source.nix
|
- source.nix
|
||||||
https://raw.githubusercontent.com/eregon/oz-tmbundle/master/Syntaxes/Oz.tmLanguage:
|
https://raw.githubusercontent.com/eregon/oz-tmbundle/master/Syntaxes/Oz.tmLanguage:
|
||||||
- source.oz
|
- source.oz
|
||||||
|
https://raw.githubusercontent.com/tenbits/sublime-mask/release/Syntaxes/mask.tmLanguage:
|
||||||
|
- source.mask
|
||||||
@@ -155,6 +155,22 @@ module Linguist
|
|||||||
Language["LiveScript"]
|
Language["LiveScript"]
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
disambiguate "Common Lisp", "NewLisp" do |data|
|
||||||
|
if /^\s*\((defun|defactor|in-package|defpackage) /.match(data)
|
||||||
|
Language["Common Lisp"]
|
||||||
|
elsif /^\s*\(define /.match(data)
|
||||||
|
Language["NewLisp"]
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
disambiguate "TypeScript", "XML" do |data|
|
||||||
|
if data.include?("<TS ")
|
||||||
|
Language["XML"]
|
||||||
|
else
|
||||||
|
Language["TypeScript"]
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
disambiguate "Frege", "Forth", "text" do |data|
|
disambiguate "Frege", "Forth", "text" do |data|
|
||||||
if /^(: |also |new-device|previous )/.match(data)
|
if /^(: |also |new-device|previous )/.match(data)
|
||||||
@@ -165,13 +181,5 @@ module Linguist
|
|||||||
Language["text"]
|
Language["text"]
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
disambiguate "Common Lisp", "NewLisp" do |data|
|
|
||||||
if /^\s*\((defun|defactor|in-package|defpackage) /.match(data)
|
|
||||||
Language["Common Lisp"]
|
|
||||||
elsif /^\s*\(define /.match(data)
|
|
||||||
Language["NewLisp"]
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1719,7 +1719,7 @@ Mask:
|
|||||||
ace_mode: mask
|
ace_mode: mask
|
||||||
extensions:
|
extensions:
|
||||||
- .mask
|
- .mask
|
||||||
tm_scope: source.scss
|
tm_scope: source.mask
|
||||||
|
|
||||||
Mathematica:
|
Mathematica:
|
||||||
type: programming
|
type: programming
|
||||||
@@ -2333,6 +2333,7 @@ Python:
|
|||||||
- BUILD
|
- BUILD
|
||||||
- SConscript
|
- SConscript
|
||||||
- SConstruct
|
- SConstruct
|
||||||
|
- Snakefile
|
||||||
- wscript
|
- wscript
|
||||||
interpreters:
|
interpreters:
|
||||||
- python
|
- python
|
||||||
@@ -3079,6 +3080,7 @@ XML:
|
|||||||
- .tmSnippet
|
- .tmSnippet
|
||||||
- .tmTheme
|
- .tmTheme
|
||||||
- .tml
|
- .tml
|
||||||
|
- .ts
|
||||||
- .ui
|
- .ui
|
||||||
- .urdf
|
- .urdf
|
||||||
- .vbproj
|
- .vbproj
|
||||||
|
|||||||
47
samples/XML/pt_BR.ts
Normal file
47
samples/XML/pt_BR.ts
Normal file
@@ -0,0 +1,47 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!DOCTYPE TS>
|
||||||
|
<TS version="2.0" language="pt_BR">
|
||||||
|
<context>
|
||||||
|
<name>MainWindow</name>
|
||||||
|
<message>
|
||||||
|
<location filename="../forms/mainwindow.ui" line="22"/>
|
||||||
|
<source>United Kingdom</source>
|
||||||
|
<translation>Reino Unido</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../forms/mainwindow.ui" line="38"/>
|
||||||
|
<source>God save the Queen</source>
|
||||||
|
<translation>Deus salve a Rainha</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../mainwindow.cpp" line="46"/>
|
||||||
|
<source>England</source>
|
||||||
|
<translation>Inglaterra</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../mainwindow.cpp" line="47"/>
|
||||||
|
<source>Wales</source>
|
||||||
|
<translation>Gales</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../mainwindow.cpp" line="48"/>
|
||||||
|
<source>Scotland</source>
|
||||||
|
<translation>Escócia</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../mainwindow.cpp" line="49"/>
|
||||||
|
<source>Northern Ireland</source>
|
||||||
|
<translation>Irlanda Norte</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../mainwindow.cpp" line="51"/>
|
||||||
|
<source>Portuguese</source>
|
||||||
|
<translation>Português</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../mainwindow.cpp" line="52"/>
|
||||||
|
<source>English</source>
|
||||||
|
<translation>Inglês</translation>
|
||||||
|
</message>
|
||||||
|
</context>
|
||||||
|
</TS>
|
||||||
@@ -150,4 +150,11 @@ class TestHeuristcs < Test::Unit::TestCase
|
|||||||
"LoomScript" => "LoomScript/HelloWorld.ls"
|
"LoomScript" => "LoomScript/HelloWorld.ls"
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def test_ts_by_heuristics
|
||||||
|
assert_heuristics({
|
||||||
|
"TypeScript" => all_fixtures("TypeScript", "*.ts"),
|
||||||
|
"XML" => all_fixtures("XML", "*.ts")
|
||||||
|
})
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user