18329 Commits

Author SHA1 Message Date
Groggy Dice
d3bb951548 check for textdomain paths without '/translations', and binary paths referring to 'external' data
The convention that [textdomain] uses "/translations" is strongly established, and I can't think of a legitimate reason for an add-on not to be following it.

The binary path check is a crude test. The names that took hold for menu image directories are "/public" and variations of "/external*", so we look for those strings. It does not catch the worst case of all - when all binaries are outside the campaign define, not just a set-aside directory.

I first thought of these checks while brainstorming ways to use the in_textdomain and in_binary_path code in hack_syntax(). However, realizing that these checks did not really hack any syntax, I wanted to find someplace in the sanity checks where the code would fit. I finally found it.
2013-08-21 04:39:44 -04:00
Ignacio R. Morelle
74915e33bf Add scroll_to_leader field to the [store_side] WML action 2013-08-20 18:25:03 -04:00
Ignacio R. Morelle
5b72fe99a5 Ensure complete darkness after FADE_TO_BLACK and FADE_TO_BLACK_HOLD
Add -256 and -512 color shifts to the FADE_TO_BLACK and
FADE_TO_BLACK_HOLD macros in order to account for ToD color shifts
greater than -31.
2013-08-20 18:07:48 -04:00
Groggy Dice
6cf03fe827 fix wmltools' parse_attribute to not consider pango color hashes as a comment
While there are many places that wmllint assumes that "#" begins a comment, from Vultraz's description it sounded like parse_attribute was being used to find the attribute's value, and then a string_strip was done on the value. So I looked for the direct cause in wmltools.

Again, the solution is to look for whitespace to precede the hashsign.

Incidentally, I don't know why the original code had the first "where -= 1", then had value and comment go from [:where+1] and [where+1:].
2013-08-19 22:06:16 -04:00
Groggy Dice
d90f082312 wmlindent: fix pango indentation-stopping bug (pointed out by vultraz)
I had a hunch that the hash would be the problem, because I realized that wmllint usually just looked for '#' to figure out if a line contained a comment, and that this also matched pango color coding. My wmllint backslash/userdata commits used this same re.split match to prevent this false positive.

(It won't prevent all unintended matches, e.g. "Guard #4", but I don't think that can be helped.)

The problem came, I believe, when the old line interacted with the block ten lines down:

        elif eligible.count('"') % 2:
            dostrip = not dostrip

The value's closing quote was on the other side of the split.
2013-08-18 23:08:19 -04:00
Andrius Štikonas
892463c52f [Lithuanian Translation] Updated map localization of DiD and TSG. 2013-08-18 20:07:26 +03:00
Groggy Dice
8b3aba7ccb wmllint: extend scenario check to include first scenario
Some newbie authors run into trouble at this point!
2013-08-17 19:27:00 -04:00
Groggy Dice
93af90d2db additions to wmllint help
Here's the rationale for these additions:

* There is so much focus on wmllint's role in conversion, that many people may not think of it as a validator also (I didn't). So often, stumped authors ask in the forums about problems that would have been fixed or pointed out if they'd run wmllint. I want to encourage awareness of wmllint as a validator.

* Folded a line to fit normal 80-width CLI.

* Help contained no mention of this rather redundant option.

* How many people don't realize that ESR's long introduction is there?

* Some users may not understand why they're being dumped back to wmllint's help.
2013-08-17 19:26:52 -04:00
Groggy Dice
db560619e8 wmllint: add switch -K --known for suppresing consistency_check()
I used "inconsistency" for the actual variable name, because "known" seems more likely to be accidentally reused.

I pondered whether to allow the scenario check to go forward, but decided to just make a clean break.

Note that this does not prevent any of the information-gathering for the consistency check, just the check itself.

Why would you want to use this option? Of course, you should run the consistency check at some point. But if you simply want to recheck if you've fixed all the bugs in your campaign, you might not want to have wmllint slog through data/core again.
2013-08-17 19:26:44 -04:00
Groggy Dice
46e9d8dc1d wmllint: bugfix missing "stringfreeze" long argument in getopt, and correct help description
According to the introduction, stringfreeze does *not* suppress the warning, and the code bears this out.

I wonder how often this option is actually used.
2013-08-17 19:26:36 -04:00
Groggy Dice
45fa75c082 change introduction's reference to checking out wmllint from 1.4 branch, to wmllint-1.4 2013-08-17 19:26:29 -04:00
ln-zookeeper
9b13a182e6 New bigmap and journey markers for DiD. 2013-08-17 10:56:24 +03:00
Groggy Dice
8335d131bd wmllint-1.4: revise help to reflect its current status as an adjunct to current wmllint 2013-08-15 20:43:57 -04:00
Groggy Dice
a315603d2c wmllint: bugfix "unresolved scenario" check 2013-08-15 19:20:50 -04:00
Groggy Dice
b999da8774 "wmllint: unwho ALL" who entries at LoW's final battle 2013-08-15 19:20:24 -04:00
Groggy Dice
c3863ac222 implement keyword 'unwho ALL' for clearing all "wmllint: who" entries at end of campaign
I realized that as it stood, my dictionary would linger, bad if wmllint were being run on multiple campaigns. A special unwho keyword, 'all', clears the dictionary.
2013-08-15 19:13:22 -04:00
Groggy Dice
17e2c93efd Liberty utils.cfg: typo fix: born -> borne 2013-08-15 01:22:27 -04:00
Groggy Dice
76134b5bfe Legend_of_Wesmere: convert main characters and key loyals of LoW to 'wmllint: who' system
Also, get rid of now-unnecessary 'recognize' magic comments
2013-08-15 01:22:17 -04:00
Groggy Dice
a8a65c25b2 add explanation about how to use "wmllint: who" magic comments to introduction 2013-08-15 01:22:05 -04:00
Groggy Dice
ab18d94117 magic comment to remove items from whopairs dictionary
If no more scenarios will be using a macro, you can remove it from the dictionary with "unwho".
2013-08-15 01:21:46 -04:00
Groggy Dice
56be5f2f6b recognize characters from "wmllint: who" macros and append to present
Now that we see how the whopairs are recognized, we can see that the magic comment accepts a comma-separated list, for macros that deal with more than one character.

We also see that if it is necessary to remove a character who leaves the party, this can be done with another entry prefixed by double minuses.
2013-08-15 01:21:28 -04:00
Groggy Dice
21c50ccb2e create magic comment for persistent macro character recognition, "wmllint: who"
The "recognize" magic comment only covers one scenario; but what about macros that are used in many scenarios?

This new magic comment creates dictionary pairs of macros with the characters they are associated with. If this is not yet clear, hopefully the following commits will show the full picture.
2013-08-15 01:21:14 -04:00
Andrius Štikonas
a23f2ed0e4 Reduce the size of Galician images by 90%. 2013-08-14 21:08:55 +03:00
Andrius Štikonas
fd32960043 [Lithuanian Translation] Updated map localization of AoI and HttT. 2013-08-14 20:36:03 +03:00
Charles Dang
7454353459 Fixed image path of last frame in Elvish Outrider ranged anim (pointed out by bumbadadabum) 2013-08-14 00:57:48 +11:00
Charles Dang
c6655fdecc Fixed paths to stonebridge and tropical forest icons in their respective help topics 2013-08-13 14:11:20 +11:00
Adrián Chaves Fernández (Gallaecio)
ce77900176 Removed a trailing parenthesis at the end of a string that made no sense there. 2013-08-12 22:10:13 +02:00
Adrián Chaves Fernández (Gallaecio)
10d25c56c0 [Galician Translation] Updated map localization of “An Orcish Incursion”. 2013-08-12 07:24:44 +02:00
ln-zookeeper
9111ed02b5 New bigmap and journey markers for AOI. 2013-08-11 15:53:36 +03:00
ln-zookeeper
c45d3dc9be Merge branch 'master' of https://github.com/wesnoth/wesnoth-old 2013-08-11 11:48:50 +03:00
Adrián Chaves Fernández (Gallaecio)
9eeaaff752 [Galician translation] Translated images and minor text changes 2013-08-10 19:23:49 +02:00
Alexander van Gessel
abe67d8136 Merge branch 'master' of github.com:wesnoth/wesnoth-old 2013-08-09 00:20:02 +02:00
Alexander van Gessel
38b224c1ff Revert "Revert "Merge branch 'master' of github.com:wesnoth/wesnoth-old""
This reverts commit 23b72d6956e6316f8b50a6accba607f66cf197a7.
2013-08-09 00:13:46 +02:00
Thibault Févry
e825989bbe More range() genocide. 2013-08-09 00:13:03 +02:00
Thibault Févry
1dc00f0d93 More range() destruction. 2013-08-08 23:53:34 +02:00
Thibault Févry
e4a1dcdb88 More range to xrange conversion. 2013-08-08 23:46:36 +02:00
Thibault Févry
961dcb8c25 Remove useless ';' 2013-08-08 23:45:52 +02:00
Thibault Févry
b5319fa235 Use xrange instead of range. 2013-08-08 23:41:50 +02:00
Thibault Févry
e3fbfe5225 Use for i in iterable instead of for i in range(len(iterable)). Have a hard time testing it well, but it seems to not break anything. 2013-08-08 23:35:11 +02:00
Thibault Févry
5a5287b1f7 Use string formatting when possible. Can't use str.format() (although it would be easier to read since it was only added in 2.6 2013-08-08 19:21:39 +02:00
Thibault Févry
f4fc1c5912 Make pep8 happier. 2013-08-08 19:07:47 +02:00
Thibault Févry
65a14eff16 Fix indenting (again) 2013-08-08 18:56:11 +02:00
Thibault Févry
23b72d6956 Revert "Merge branch 'master' of github.com:wesnoth/wesnoth-old"
This reverts commit 5fa5c034110c3c942d299c8fd440297c89aca037, reversing
changes made to 06374c64ba00977a4f720a44108593fc43d5c787.
2013-08-08 18:50:46 +02:00
Thibault Févry
ddfc7d3282 Revert "Fix indenting."
This reverts commit ab58cc959c54461430868f31f2625c91501518ea.
2013-08-08 18:48:45 +02:00
Thibault Févry
ab58cc959c Fix indenting. 2013-08-08 18:31:47 +02:00
Thibault Févry
5fa5c03411 Merge branch 'master' of github.com:wesnoth/wesnoth-old 2013-08-08 13:18:10 +02:00
Adrián Chaves Fernández (Gallaecio)
97d9918419 “But if if this battle…” → “But if this battle…” 2013-08-07 21:33:58 +02:00
Alexander van Gessel
08d1c949f1 wmlindent workarounds for some micro_ai scenarios 2013-08-05 00:15:58 +02:00
Alexander van Gessel
0738a4e59c make reindent minus some wmlindent issues 2013-08-04 23:22:56 +02:00
Alexander van Gessel
41a4ea849e Merge branch 'master' of github.com:wesnoth/wesnoth-old 2013-08-04 22:58:45 +02:00