aboutsummaryrefslogtreecommitdiffstats
path: root/includes/language/converters/BanConverter.php
Commit message (Collapse)AuthorAgeFilesLines
* Remove 2-line PHPDocs that just repeat the types from the codethiemowmde2025-01-171-1/+0
| | | | | | | | | | | | | | | | Same as Ia294bf4 did for 1-line comments. This patch removes slightly more complex 2-line PHPDoc comments that don't add any new information to the code, but literally repeat what the code already says. They say "don't document the code, code the documentation", and we are doing this more and more. We just tend to forget to remove the obsolete comments. Note I'm also removing a line of text in a few cases when it's very short and literally says the same as the method name. Again, such comments add zero new information. Change-Id: I01535404bab458c6c47e48e5456403b7a64198ed
* LanguageConverter implementation minor cleanupReedy2023-10-021-18/+0
| | | | | | | * Remove unnecessary duplicate documentation * Code tweaks Change-Id: I4695017ad9566da0ad7c0a621f5b67d93a03df39
* Just another 80 or so PHPStorm inspection fixes (#4)Tim Starling2023-03-251-1/+1
| | | | | | | | | | | | | * Unnecessary regex modifier. I agree with this inspection which flags /s modifiers on regexes that don't use a dot. * Property declared dynamically. * Unused local variable. But it's acceptable for an unused local variable to take the return value of a method under test, when it is being tested for its side-effects. And it's acceptable for an unused local variable to document unused list expansion elements, or the nature of array keys in a foreach. Change-Id: I067b5b45dd1138c00e7269b66d3d1385f202fe7f
* language: Add missing `@ingroup`, subgroup "Languages" and ungroup filesTimo Tijhof2022-06-281-7/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | == Ungroup file blocks Remove `@ingroup` from `@file` blocks and keep only the class block. This matches similar changes previously applied to API, Skins, Profile, and ResourceLoader. This helps make the API documentation easier to navigate. E.g. Modules -> Language in the sidebar of <https://doc.wikimedia.org/mediawiki-core/master/php/> as well as <https://doc.wikimedia.org/mediawiki-core/master/php/group__Language.html> These are currently cluttered with tons of duplicate entries for files and classes both. We only need to group files that aren't also documented as a class (e.g. message files, entry points, other scripts or files that we mainly consider a data file). This has the helpful side-effect that we don't encourage duplication of the class description (or worse, place useful docs only in the file block), and makes the class files consistently start with a mentally ignorable block. Basically, unless there's something other than a class, don't describe or group the file itself. == Missing group Various classes in this subtree were missing the `Language` group, or were using different group from before T225756. == Subgroup For ease of navigation, move Converter subclasses to a group called "Languages", which for documentation purposes is a subgroup of "Language". The next commit does the same for Messages* files, and Language subclasses (done separately for ease of review). Change-Id: I301f471f86ba2dee924fece29a16dc3c20b5bebe
* Language: Turn public properties into Getters in LanguageConverter based ↵Peter Ovchyn2021-02-031-7/+29
| | | | | | | | | | | | | hierarchy The main goal is to simplify the construction of the LanguageConverter and avoid using constructors for derived classes. In order to hard-deprecate removed property, DeprecationHelper::deprecatePublicPropertyFallback was introduced. Bug: T253834 Change-Id: Ib167982e4e872cfdf0fbcb78b7ca597f5ac8d60a
* Implement Balinese language converterDavid Kamholz2020-12-211-0/+1034
This patch implements the BanConverter class for Balinese. Its purpose is to transliterate Balinese in Balinese script to Latin script. Latin to Balinese is not currently supported, because (1) the Latin transliteration is not fully one-to-one, (2) I'm not aware of any users who currently need Latin to Balinese. The converter supports three distinct Latin transliteration variants: ban-dharma, ban-palmleaf, and ban-puri-kauhan-ubud. All three variants have been requested by different Balinese community members working with Balinese palm-leaf manuscripts. ban-puri-kauhan-ubud is the default, as it is the most familiar to lontar scholars, but Balinese Wikisource users will be able to select their preferred variant via a user script. Conversion is accomplished via ICU Rule-Based Transliterators, bindings for which are available through the Intl extension. This patchset adds the abstract class LanguageConverterIcu and has BanConverter inherit from it (makes future ICU-based LanguageConverters easier). Bug: T263082 Change-Id: Ic3a46a215fbf020a022726e6b130b1d25496e284