Skip to content

Commit

Permalink
Angular fix, french language added (#120)
Browse files Browse the repository at this point in the history
* Angular fix

* French i18n added
  • Loading branch information
tseignette authored Jul 20, 2020
1 parent 546ec11 commit 4248e7e
Show file tree
Hide file tree
Showing 2 changed files with 62 additions and 9 deletions.
53 changes: 53 additions & 0 deletions _locales/fr/messages.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
{
"extName": {
"message": "Library Sniffer",
"description": "Nom de l'extension"
},
"extShortName": {
"message": "LibSniffer",
"description": "Nom court de l'extension"
},
"extDesc": {
"message": "Détectez les frameworks Web et librairies JavaScript qui s'exécutent sur les sites que vous visitez.",
"description": "Description de l'extension"
},
"extIntroTitle": {
"message": "Introduction",
"description": "Page des options : titre de l'introduction"
},
"extIntroduction": {
"message": "Library Sniffer : vous pouvez détecter",
"description": "Page des options : introduction"
},
"extIntroductionJavascript": {
"message": "Librairies JavaScript : jQuery, ExtJS, Angular, etc."
},
"extIntroductionWebAPI": {
"message": "API Web : Blogger, Google Analytics, etc."
},
"extIntroductionWebFramework": {
"message": "Frameworks Web : WordPress, phpBB, Drupal, MediaWiki, codeigniter, etc."
},
"extIntroductionWebSever": {
"message": "Serveurs Web : PHP, Apache, nginx, IIS, etc."
},
"extIntroductionSource": {
"message": "Code source : "
},
"extIntroductionNotice": {
"message": "Les développeurs aiment toujours cacher quelque chose, il pourrait donc y avoir des erreurs."
},
"extIntroductionDeveloper": {
"message": "Si vous êtes un développeur, vous pouvez "
},
"extIntroductionIssues": {
"message": "créer un ticket"
},
"extIntroductionThanks": {
"message": "merci"
},
"pageActionTitle": {
"message": "Cliquez pour voir les détails ...",
"description": "Titre de la page d'action"
}
}
18 changes: 9 additions & 9 deletions js/detector.js
Original file line number Diff line number Diff line change
Expand Up @@ -414,8 +414,8 @@
},
'SPDY': function() {
if (window.PerformanceNavigationTiming) {
const ntEntry = performance.getEntriesByType('navigation')[0];
return ['h2', 'hq'].includes(ntEntry.nextHopProtocol);
const ntEntry = performance.getEntriesByType('navigation')[0];
return ['h2', 'hq'].includes(ntEntry.nextHopProtocol);
}
return false;
},
Expand Down Expand Up @@ -589,16 +589,16 @@
},
'Angular': function() {
if (window.ng && window.document.body && window.document.body.children.length > 0) {
var children = new Array(window.document.body.children[0]);
var rootCmp = children.find( function (e) {
return e.attributes && 'ng-version' in e.attributes;
});
return rootCmp.attributes['ng-version'].nodeValue;
const rootCmp = document.querySelectorAll('*[ng-version]')[0];

if (rootCmp) {
return rootCmp.getAttribute('ng-version');
}
}
},
'Ionic': function () {
if(window.Ionic && window.Ionic.version) return window.Ionic.version;
if(window.ionic && window.ionic.version) return window.ionic.version;
if(window.Ionic && window.Ionic.version) return window.Ionic.version;
if(window.ionic && window.ionic.version) return window.ionic.version;
},
'D3': function() {
if (window.d3 && window.d3.version) return window.d3.version;
Expand Down

0 comments on commit 4248e7e

Please sign in to comment.