Template talk:he-noun

From Wiktionary, the free dictionary
Latest comment: 8 years ago by Wikitiki89 in topic Falsely categorized as feminine plural in -im
Jump to navigation Jump to search

Making cons= optional.

[edit]

Currently, the cons= parameter is mandatory: either a singular construct form must be specified, or cons=- to indicate that no singular construct form exists, or the word will be added to Category:Hebrew noun articles missing singular construct forms. However, for long modern nouns, the issue isn't so much whether it exists, as whether it meets CFI. I've been adding the hypothetical construct form without vowels (i.e., for nouns ending in ־ה I've been changing it to ־ת, and for other nouns I've just duplicated the consonants of the indefinite form), but that's potentially misleading, since it would be very rare to actually see someone use that form. I think that cons= should be made optional — either the category is only added when cons=?, or maybe the category is added by default, but cons=nocat suppresses it, or maybe simply cons=- shouldn't be so bold as to state that no singular construct form exists, and should mean simply "hey, template: don't list the singular construct form". Any thoughts? —RuakhTALK 14:30, 24 May 2008 (UTC)Reply

I agree cons should be optional; I like your "cons=?" and "cons=- shouldn't be bold" suggestions.—msh210 20:21, 26 May 2008 (UTC)Reply

plcons= and plconswv=

[edit]

Opiaterein (talkcontribs) has left a note on my talk-page, suggesting that plcons= and plconswv= be added to this template. I'm neutral on the matter — a lot of dictionaries present that, at least for irregular nouns, but on the other hand we theoretically provide full declension tables anyway — but as a matter of process, I figured I should mention it here and wait a day or so before actually doing it. —RuakhTALK 17:21, 1 July 2009 (UTC)Reply

Proposed rewrite.

[edit]

I've created a proposed new version at User:Ruakh/Template. The proposed version strives to behave exactly like the current version (and I intend to do a lot of testing to ensure that; so far I've done just a bit). The improvements are all internal; the proposed version separates three concerns that are badly intermingled in the current version:

  • All the structure of parentheses and commas and semicolons and spaces between forms is handled by {{he-noun/helper}}.
  • {{User:Ruakh/Template}} itself handles all the real content; for example, if a plural indefinite form is included, then it handles the ''plural indefinite form'' {{Hebr|lang=he|face=head|...}} stuff and passes that in to {{he-noun/helper}} as pl=.
  • {{User:Ruakh/Template}} itself also handles all the categories, both regular categories and cleanup categories, but whereas the current version mixes that in with the HTML-generating template-code, the proposed version puts all the category stuff together at the end.

The reason for the change would be that the new version should be much easier to make improvements to. For example, my cons=? idea above has languished for more than three years, due in part to its being a pain to implement: all the formatting code that checks to see if a singular construct form is specified (in order to figure out where/whether to include punctuation) would have to be modified to see if it's specified and not ?. With the proposed version, this becomes much simpler, since the formatting logic depends only on whether cons=... is generating actual wiki-code.

Another bit of refactoring may also be warranted, creating some sort of {{he-infl-link}} to handle the repeated {{Hebr|lang=he|face=head|[[...|... \ ...]]}} logic (cf. {{he-onym}}); the current proposed refactoring is probably independent of that one, though.

Any questions/comments/objections/concerns/whatnot?

RuakhTALK 02:14, 1 September 2011 (UTC)Reply

Done Done. Incidentally, I found during testing that the existing version had some issues with formatting that were fixed by the refactoring: if the pausal form was present, but the inflected forms were missing, then the old version would have a ( before the pausal form but no ) after it. More evidence that the existing version was unmaintainable. :-)   —RuakhTALK 14:43, 6 September 2011 (UTC)Reply

RTL issue

[edit]

Here you can see a strange behavior: during the template processing, the point moves from ג to ב. I suppose this is a RTL issue. Maybe someone can take a look into it. -- 88.74.222.163 06:20, 12 March 2012 (UTC)Reply

Found a second example at מלכה#Noun. -- 88.74.222.163 06:44, 12 March 2012 (UTC)Reply
I don't see any problem. At géver I see a dagésh in the gímel, and at malká I see a dagésh in the káf. Is that not what you see? —RuakhTALK 13:46, 12 March 2012 (UTC)Reply
It seems to be a problem on the Mac only. I checked it on a windows system and it was OK. See the screenshot below (left: Safari, right: Firefox) -- Stf (talk) 08:07, 13 March 2012 (UTC)Reply
FWIW: The HTML source code is OK, it must be a bug in the browsers. -- Stf (talk) 08:21, 13 March 2012 (UTC)Reply
That's . . . wow. Tell me, does גֶּבֶר render any better? (That forces the dagésh to precede the segól in the source text, by using a numeric character escape to represent the segól, so that MediaWiki can't impose NFC and interpose them.) Similarly, how about מַלְכָּה? —RuakhTALK 11:51, 13 March 2012 (UTC)Reply
Both are OK. It is a nasty workaround, but it works. -- Stf (talk) 21:34, 13 March 2012 (UTC)Reply


Could you try adding this bit of JavaScript to User:Stf/common.js? :

addOnloadHook
( function ()
  { jQuery('.Hebr').each
    ( function(index, element)
      { if(/[\u0591-\u05C4]\u05BC/.test(element.innerHTML))
          element.innerHTML =
            element.innerHTML.replace(/([\u0591-\u05C4]+)\u05BC/g, 'ּ$1');
      }
    );
  }
);

that will find any places where MediaWiki has put a dagésh after other nikúd, and will forcibly undo that. If it works for you, we might want to add it to site-wide JavaScript.
RuakhTALK 22:04, 13 March 2012 (UTC)Reply

Works perfect. Thank you. -- Stf (talk) 23:00, 13 March 2012 (UTC)Reply

Maybe I found a new variant of this problem: on אפשר#Adjective (template:head), the shin dot moves from right to left. Same with השתמש#Verb (template:he-verb) on the first shin. Maybe you can catch it with your script? Thank you. -- Stf (talk) 20:23, 15 April 2012 (UTC)Reply

Yup, that sounds like the same problem. Thanks for letting me know. I believe this updated script should catch that as well:
addOnloadHook
( function ()
  { jQuery('.Hebr').each
    ( function(index, element)
      { if(/[\u0591-\u05C4][\u05BC\u05C1\u05C2]/.test(element.innerHTML))
          element.innerHTML =
            element.innerHTML
              .replace(/([\u0591-\u05C4]+)\u05C1/g, 'ׁ$1')
              .replace(/([\u0591-\u05C4]+)\u05C2/g, 'ׂ$1')
              .replace(/([\u0591-\u05C4]+)\u05BC/g, 'ּ$1');
      }
    );
  }
);
(Same approach as before, except now it puts any shín and sín dot before any dagésh, and any of these before any other nikúd.)
To test it: שֶׁמֶשׁ (shín, no dagésh); שָׂמֵחַ (sín, no dagésh); דִּבֵּר (dagésh, no shín or sín); להִשָּׁבֵר (shín with dagésh); הַשָּׂמֵחַ (sín with dagésh); נִשְׁבַּר (shín and dagésh separately).
RuakhTALK 03:19, 16 April 2012 (UTC)Reply
It works fine, thank you. -- Stf (talk) 21:51, 16 April 2012 (UTC)Reply
Today I encountered the sin/shin problem again. I deleted User:Stf/common.js and all nikuds are on the right place, only shin/sin are sometimes wrong. The שֶׁמֶשׁ, written as {{Hebr|שֶׁמֶשׁ|lang=he}}, reads shemes (first shin, second sin), but this ->שֶׁמֶשׁ<- (plain text) looks fine. If I get it right, only the shin as the last character of a word within a linking template is affected: the entry שלג is OK, אש and שמש are broken. At this moment, I recomment to disable the JavaSript since it causes some extra trouble (disapearing dageshs, sin for shin). I recently updated to Mac OS Maverick, I assume there was a change in some system libraries. -- Stf (talk) 00:06, 31 October 2013 (UTC)Reply
Interesting! How does ‎{{lang|he|שֶׁמֶשׁ|‏שֶׁמֶשׁ‏}}‎ look? (And ‎‏שֶׁמֶשׁ‏‎?)—RuakhTALK 00:42, 31 October 2013 (UTC)Reply
&lrm;{{Hebr|שֶׁמֶשׁ|&rlm;שֶׁמֶשׁ&rlm;|lang=he}}&lrm; is "shemes", &lrm;&rlm;שֶׁמֶשׁ&rlm;&lrm; is "shemesh". -- Stf (talk) 05:58, 31 October 2013 (UTC)Reply

alternative plural forms

[edit]

What is the right way to encode alternative plural forms? See גב for my first attempt, but in this manner the template produces a wrong link (of course). -- Stf (talk) 06:12, 19 October 2012 (UTC)Reply

I generally choose one for the inflection-line, and mention the other in a usage note. See e.g. יובל#Hebrew, קבר#Hebrew, דמות#Hebrew. —RuakhTALK 12:04, 19 October 2012 (UTC)Reply

Documentatin for dwv and pldwv

[edit]

Could someone please add documentation for the parameters dwv and pldwv? I've seen them here and I guess that they are for spellings that differs between vocalized and unvocalized forms. Thanks. Stf (talk) 22:21, 4 November 2012 (UTC)Reply

Re: "I guess that they are for spellings that differs between vocalized and unvocalized forms": Indeed. The 'd' stands for "defective" (חסר, as in כתיב חסר). And yeah, we need to document this . . . —RuakhTALK 23:53, 4 November 2012 (UTC)Reply

Falsely categorized as feminine plural in -im

[edit]

בת ים is categorized as a feminine noun with plural ending in ים. As a string of letters, the plural does, but the plural ending is -ות, added to the first word. The ים at the end means "sea"; it's not a plural. PierreAbbat (talk) 05:07, 12 May 2016 (UTC)Reply

Unfortunately, the correct way to fix this is to implement better handling of compound words in general, which would take some time. --WikiTiki89 15:12, 12 May 2016 (UTC)Reply