Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow the tour to be used from the a language directory - fixes #461 #470

Merged
merged 1 commit into from
Sep 1, 2016

Conversation

wilzbach
Copy link
Member

@wilzbach wilzbach commented Aug 25, 2016

This allows the following:

dlang-tour -l .
// or for the more verbose people
dlang-tour --lang-dir .

and more importantly:

dlang-tour -l . --sanity-check
  • If the -l option is used, the prebundled languages will be ignored
    • testing German with a the bundled German doesn't make sense)
    • sanity-checking bundled content doesn't make sense either
  • It sets the language as default language, s.t. the tour automatically opens in the to be tested language (here for German):

image

This is based on #469.

@stonemaster Could you release a 1.0.2 version after this has been merged because this allows with #469 the tour to be run offline and with this PR to be used conveniently for translators.

@wilzbach
Copy link
Member Author

This is based on #469.

Seems like we shouldn't use squash commits GitHub if we want to avoid conflicts with PRs that contain/depend on the same commit.
-> rebased ;-)

@wilzbach
Copy link
Member Author

With more and more translations being started, I think this would be very nice to have.
@stonemaster I think I should be able to tag a release too, so we only lack your feedback on using - l/--lang-dir as flag for a user-provided language.

}
language_[language] = langMeta;

auto i = 0;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh it seems there is an indentation issue here :/

{
enforce(attr in root, "'" ~ attr ~ "' point required in language-specific yaml");
mixin("langMeta." ~ attr ~ " = root[attr].as!string;");
}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this might not the best serialization solution, but as long as we don't have many parameters it should work for us.

@wilzbach
Copy link
Member Author

@ZombineDev could you have a quick look at this? I would like to release 1.0.2 with this feature for our translators.

FYI: @stonemaster is currently busy and I take the full blame for errors caused by this PR.

@PetarKirov
Copy link
Member

PetarKirov commented Aug 31, 2016

Ok, I'll try to do a review later tonight.

@wilzbach
Copy link
Member Author

wilzbach commented Sep 1, 2016

FYI: @stonemaster is currently busy and I take the full blame for errors caused by this PR.

I will be busy over the next days & would like to release 1.0.2 before, so I will merge this now. Sorry about violating our review protocol here.

@wilzbach wilzbach merged commit 5160844 into dlang-tour:master Sep 1, 2016
@wilzbach wilzbach deleted the tour-language-dir branch September 1, 2016 15:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants