-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move howto to Locale and script to format HTML
Rather than manually regenerate it and store it in %Lexicon, ship it as an `.html` file in the appropriate locale directory. Pilfer the `from_file` Locale method from PGXN::Site, but remove the Locale::Maketext processing step to avoid the need to escape characters it looks for. There should be no Locale::Maketext processing anyway: just the translated document. Fixes #76. Add `bin/format_l10n_docs`, a simple script that uses `multimarkdown` to regenerate the `.html` version of Markdown files in `lib`. This will allow other localize-able documents to be added in the future.
- Loading branch information
Showing
7 changed files
with
467 additions
and
393 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#!/usr/bin/env perl -w | ||
|
||
# Find all .md files in lib, run them through multimarkdown, and write | ||
# to .html. | ||
# | ||
# brew install multimarkdown | ||
|
||
use 5.10.0; | ||
use strict; | ||
use warnings; | ||
use utf8; | ||
use File::Find; | ||
use File::Basename qw(basename); | ||
|
||
find({ | ||
no_chdir => 1, | ||
wanted => sub { | ||
return unless /\.md$/; | ||
my $src = $File::Find::name; | ||
my $dst = $src =~ s/\.md$/.html/r; | ||
my @cmd = ('multimarkdown', $src, '-o', $dst); | ||
system(@cmd) == 0 or die "system @cmd failed: $?\n" | ||
}, | ||
}, 'lib'); |
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters