Question 'Reference number'
- Franz Frese
- Topic Author
- Offline
- Elite Member
The contexts are INDI, NOTE, OBJE, REPO, SOUR, FAM.
Please Log in or Create an account to join the conversation.
- mp
- Offline
- Senior Member
- Franz Frese
- Topic Author
- Offline
- Elite Member
Please Log in or Create an account to join the conversation.
- Peter_S
- Offline
- Premium Member
The context can be specified closer by the TYPE tag.
Peter
webtrees 2.1.22, vesta modules, chart modules of magicsunday, extended family and imprint of hartenthaler
PHP 8.3.12, MariaDB 10.11.8
Webhosting: genonline.de
Please Log in or Create an account to join the conversation.
- Franz Frese
- Topic Author
- Offline
- Elite Member
Please Log in or Create an account to join the conversation.
- norwegian_sardines
- Offline
- Platinum Member
- Posts: 3137
Please provide an example of your need and how it apply to your situation.I see the need for me and I would use it for me. It is called reference number but it can contain an arbitrary text. The TYPE (and its translations) is not shown everywhere, where the text 'reference number' is shown.
What part of the Reference number needs translating? I use the value in several places in my database. The number is “just a number”, similar to a book SBN, Library of Congress number, or other catalogue number. The Reference Number may contain letters, but nothing that can or could be translated.
I set the REFN.TYPE value to indicate what the reference is used for, such as ‘Accession Number’, or the name of a foreign reference organization.
+1 REFN <USER_REFERENCE_NUMBER>
+2 TYPE <USER_REFERENCE_TYPE>
Ken
Please Log in or Create an account to join the conversation.
- joeysun
- Offline
- Junior Member
I help a group of webtrees newbies and I try to tailor their sites to reflect some of the commonalities of recording our group/club's genealogical interest and needs. As an example, using again Franz's module, I can change the label of INDI:NATI tag from Nationality to Ancestral Clan. It makes the program more relevant to the newbs.Why?
Doug 周
webtrees v2.1.20 at Our Family Tree (Jiapu 家譜/家谱)
PHP Version v8.1.x, LiteSpeed V8.1, MariaDB 15.1 | protected/'hindered' by ModSecurity
Please Log in or Create an account to join the conversation.
- norwegian_sardines
- Offline
- Platinum Member
- Posts: 3137
Are you asking for the title ‘Reference Number’ to be changed to some other title, rather than the actual value of the number to be translated?
I use the REFN.TYPE to indicated what the reference number means. For example:
An accession number
1 REFN 2021.0112.0001
2 TYPE accession
Reference number used in a book for an individual (could be a foreign book SOSA, or d'Aboville System generation number)
1 REFN SFB-251
2 TYPE Smith Family Book
Ken
Please Log in or Create an account to join the conversation.
- joeysun
- Offline
- Junior Member
Yes. but only for INDI:REFN. I thought I have seen Forum Posts which people have custom modules to change the title/label, but for the life of me I cannot find those posts. That is how I enlisted the help of Franz.Joeysun/Doug: Are you asking for the title ‘Reference Number’ to be changed to some other title, rather than the actual value of the number to be translated?
Doug 周
webtrees v2.1.20 at Our Family Tree (Jiapu 家譜/家谱)
PHP Version v8.1.x, LiteSpeed V8.1, MariaDB 15.1 | protected/'hindered' by ModSecurity
Please Log in or Create an account to join the conversation.
- norwegian_sardines
- Offline
- Platinum Member
- Posts: 3137
Sorry, I can’t help with the translation of the Title/Label. If it is not now translated, then I would write up a “bug” or feature request for it so that your data entry people know what they should be adding. With some detail of the request!
The unfortunate thing for me (and potentially others) would be that the title/label could have multiple uses for an individual based on meaning. For example: what book I found that individual (the foreign book’s generation number) or the accession number all individuals and families receive when they get added to the database.
Ken
Please Log in or Create an account to join the conversation.
- norwegian_sardines
- Offline
- Platinum Member
- Posts: 3137
Ken
Please Log in or Create an account to join the conversation.
- Franz Frese
- Topic Author
- Offline
- Elite Member
Please provide an example of your need and how it apply to your situation.I see the need for me and I would use it for me. It is called reference number but it can contain an arbitrary text. The TYPE (and its translations) is not shown everywhere, where the text 'reference number' is shown.
What part of the Reference number needs translating? I use the value in several places in my database. The number is “just a number”, similar to a book SBN, Library of Congress number, or other catalogue number. The Reference Number may contain letters, but nothing that can or could be translated.
I set the REFN.TYPE value to indicate what the reference is used for, such as ‘Accession Number’, or the name of a foreign reference organization.
+1 REFN <USER_REFERENCE_NUMBER>
+2 TYPE <USER_REFERENCE_TYPE>
So for your last example, you can do a user-translation for 'Reference number' with 'Organization'. What is your problem. You can handle verything as you did before, for others it gives more flexibility. The code in the app is a simple 1:1 replace. In the translation file you need some extra lines for the context but without new translations (you can in all cases use the same as now for Reference number).
Please Log in or Create an account to join the conversation.
- norwegian_sardines
- Offline
- Platinum Member
- Posts: 3137
Im not sure what you are saying! Did you read Doug and my interaction in this thread?Franz Said:
So for your last example, you can do a user-translation for 'Reference number' with 'Organization'. What is your problem. You can handle verything as you did before, for others it gives more flexibility. The code in the app is a simple 1:1 replace. In the translation file you need some extra lines for the context but without new translations (you can in all cases use the same as now for Reference number).
Ken
Please Log in or Create an account to join the conversation.
- Franz Frese
- Topic Author
- Offline
- Elite Member
yes, which part of your interaction do you mean?
Im not sure what you are saying! Did you read Doug and my interaction in this thread?Franz Said:
So for your last example, you can do a user-translation for 'Reference number' with 'Organization'. What is your problem. You can handle verything as you did before, for others it gives more flexibility. The code in the app is a simple 1:1 replace. In the translation file you need some extra lines for the context but without new translations (you can in all cases use the same as now for Reference number).
Your usage of the tags will be unchanged with my proposed changes.
I do not want to change
+1 REFN <USER_REFERENCE_NUMBER>
+2 TYPE <USER_REFERENCE_TYPE>
I want the presentation of the tag changed in the way, that there is the possibility of a custom translation of the text 'Refenrence number', but only for the INDI.
You can understand?
Please Log in or Create an account to join the conversation.
- fisharebest
- Offline
- Administrator
This is simple to do with a module.
Create an empty module from one of the examples.
Add this "boot" function
Greg Roach - greg@subaqua.co.uk - @fisharebest@phpc.social - fisharebest.webtrees.net
Please Log in or Create an account to join the conversation.
- norwegian_sardines
- Offline
- Platinum Member
- Posts: 3137
What I think you want based on my interaction with Doug is “the title/label for the REFN tag to be record-type context sensitive”. And I agreed that the label could be different for each of the record-types (i.e. Individual Records, Family Records, Source Records, etc.)Franz asked:
I want the presentation of the tag changed in the way, that there is the possibility of a custom translation of the text 'Refenrence number', but only for the INDI.
You can understand?
I personally have no issue with the label ‘Reference Number’ in all places because that is what it is, the subtag REFN.TYPE is used in my scenario to identify what one of an infinite number of Reference Numbers the value represents. (i. e. An Accession number, a generation number from one of a hundred other books/genealogies)
So now that I understand Doug’s use case, just write up exactly what you want.
Ken
Please Log in or Create an account to join the conversation.
- Franz Frese
- Topic Author
- Offline
- Elite Member
Error: Class "TranslationNamespace\UserReferenceNumber" not found in .../modules_v4/TranslationModule/TranslationModule.php:51[/strike]
sorry (I am not used in php (without dev env))
Now it is working. Thx Greg for your Tutoring!
Please Log in or Create an account to join the conversation.
- joeysun
- Offline
- Junior Member
Doug 周
webtrees v2.1.20 at Our Family Tree (Jiapu 家譜/家谱)
PHP Version v8.1.x, LiteSpeed V8.1, MariaDB 15.1 | protected/'hindered' by ModSecurity
Please Log in or Create an account to join the conversation.