View Single Post
07/16/15, 03:02 AM   #3
merlight
AddOn Author - Click to view addons
Join Date: Jul 2014
Posts: 671
Originally Posted by votan View Post
What about passing the manifest file to get the list of Lua files?
This way wrong paths can be found quicker.
And an extra loop filling $(language) with all (unoffical) supported languages to find syntax errors in language files one normally does not use. (Already happend)
I didn't even think about parsing add-on manifest. The script just checks all .lua files it finds, there's no ESO specific logic (except stripping UTF-8 BOM). That's how I once found a broken string in french translation, which I don't understand

As for finding missing/misspelled files, here you go:

bash Code:
  1. find -name '*.txt' -exec perl -ne '
  2.    chomp;
  3.    next unless /^\w/;
  4.    for $lang (qw( en de fr ru es pt )) {
  5.        $fn = $_;
  6.        $rep = ($fn =~ s/\$\(language\)/$lang/);
  7.        print "missing $fn\n" unless -f $fn;
  8.        last unless $rep;
  9.    }
  10. ' '{}' +

Last edited by merlight : 07/16/15 at 09:28 AM.
  Reply With Quote