-
Notifications
You must be signed in to change notification settings - Fork 232
Portugues #2150
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
Draft
dantee-e
wants to merge
31
commits into
Automattic:master
Choose a base branch
from
dantee-e:portugues
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Portugues #2150
+472,404
−9,153
Conversation
This file contains hidden or 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
No processo de incluir ox parox e proparoxitonas
Helper file ox-paros-proparox that classifies the words based on the stress
Adding derive default to the language enum
It invokes different dictionaries depending on what language you pass to it
Refactored a bit of the main function to add global arguments for language and dialect. Not yet decided how to deal with dialects for other languages than English
Added both masculine and feminine genders. Also added a neutral gender so that expansions to other languages is made easier.
Now the replace can have a condition (for example, checks if it's a noun or a verb before replacing)
Now Dialect is a trait that can be used to implement other Dialects. The old Dialect struct is now called EnglishDialect, and has the same functionalities as before. The only caveat is that now one must include also the traits to be able to use the functions
Put the new properties in the wrong place. It was the }. Just a misplaced }.
Documentation had the wrong use of the Dialog trait
Now DictWordMetadata takes a DialectFlagsEnum instead of a EnglishDialect. There are some adaptations that needed to be made, for example creating the Dialect trait, and adding to this trait a function that gets most used dialects from document using a provided language (LanguageFamily, which is a variant of the enum that doesn't have the dialect contained inside it). This function should not be used for any of the specific DialectFlags implementations, only for the DialectFlagsEnum. On the counterpart, the variant of the function that doesn't receive any languages should only be used by the specific implementations, which should be progressively more private, being replaced in general by the enum. By the way, the original idea was using in the DictWordMetadata struct a Box<dyn DialogFlag>, but in the end the trait is not dyn compatible, hence this workaround
Adapting what needs to be adapted from Language to LanguageFamily
Basically EnglishDialect::American => Language::English(EnglishDialect::American) everywhere that uses LintGroup::new_curated
not yet ready
Added the language for the assert_suggestion_result function.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Adding support to the portuguese language to Harper. It is not even close to being operational.
For now, added only superficial alterations:
Demo
Nothing yet
How Has This Been Tested?
No tests yet
Checklist
If any maintainer sees this, I apologize for not keeping the commit history clean using the conventional commits practices. If there's a way to correct this besides squashing them all into one commit when merging, let me know. I make many commits just as a tiny checkpoint, so I don't usually have the patience to make it nice.