Closed (fixed)
Project:
Drupal core
Version:
6.x-dev
Component:
database system
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
9 Nov 2008 at 16:21 UTC
Updated:
2 Jan 2014 at 23:45 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
lilou commentedIt should be clean.
Comment #2
lilou commentedreplace also multiline (in simpletest.install) :
Comment #3
swentel commentedErrors in color.install - where t() shouldn't be removed , this is for the requirements, nothing todo with schema iirc
Comment #4
lilou commentedundo color.install.
Comment #5
lilou commentedUndo two wrong replacements in book.install and forum.install.
Comment #6
swentel commentedwhile we're at it, php install and color install use t() but they should rather use $t = get_t() like other modules do I think. Can someone else confirm that ?
Comment #7
Anonymous (not verified) commentedThe last submitted patch failed testing.
Comment #8
lilou commentedReroll.
Comment #9
dries commentedLooks good. Committed to CVS HEAD. We should document this on the module upgrade page. After it has been documented, please mark this 'fixed'. Thanks!
Comment #10
lilou commentedI haven't permission for edit page http://drupal.org/node/224333.
Schema descriptions are no longer translated
(Issue) To reduce the strings to translate, descriptions of the schema database (tables and fields) in module.install no longer need to be translated.
6.x:
7.x:
Comment #11
webchick@lilou: that horrible bug has now been fixed. Welcome to the documentation team. ;) Please feel free to add in your edits, which look great.
Comment #12
lilou commentedThx.
Comment #13
swentel commentedblock.install still needs some love - Let's look at others too. Noticed this thanks to #337794: PostgreSQL surge #1: make simpletest works again
Comment #14
lilou commentedYou're right.
Comment #15
webchickThanks; committed!
Comment #16
pasqualleActually the schema descriptions are all translated for D6, and also translated for contributed modules (which are translated already).
I agree, that translating these strings is meaningless. My question (1) is can I file issues for D6 contributed modules to remove t() from schema descriptions? That would make module translation much more easier, and if we translate D6 modules, then removing this option in D7 just does not seem right.
And also (2) can I file an issue for potx module, to not extract scheme descriptions from D6 and D6 modules?
Comment #17
pasqualleanswer on (2) #338409: Do not extract schema descriptions
Comment #18
pasqualleso, it seems like we will have to backport this patch to D6 (read the potx issue)
Comment #19
hass commentedI can only guess how many hours I've spend on the German translation of schema translation in D& and now all this translations are going to be lost.
Comment #20
gábor hojtsyI've translated most of the Hungarian schema strings just to see that the translation is 100%, not to say that it will be ever read, or that it would not go against storing the descriptions in the database as table comments. I am in support of a backport.
Comment #21
gábor hojtsySummarizing reasons to remove t() for hass, since he does not yet get it (see http://drupal.org/node/338409#comment-1131476):
- the functionality behind t() is not available when the schema hooks are invoked in the installer, up until locale module is enabled, so the t() calls always return the same string in installation time
- this text is documenting the code, and therefore is similar to code comments, which are not translated either
- this is technical text, and many of the translation teams such as the Hungarian team translates it just to see 100% completed translations, not because it will ever show on the interface
- if t() is not used on these strings, Drupal can actually add the descriptions to the tables and fields themselves in the database (for those backends where this is supported, for example MySQL - http://dev.mysql.com/doc/refman/5.1/en/create-table.html), so more powerful database tools can operate with those, show and help database admins to work with the tables
Comment #22
hass commentedYou missed to say that Schema module shows the translated strings in UI.
Comment #23
gábor hojtsyIt does not need to.
Comment #24
andypostSchema field descriptions possible used in views, isn't it?
If no, suppose, t() for schema in 6x is useless.
Comment #25
andypostAnother opinions to remove t()
- less runtime memory usage
- faster serialize|unserialize for locale cache
because most of descriptions less then 75 chars so they stored in locale cache but useless in production env
Comment #26
andypostEvery *.install in modules checked and cleared hook_schema t()
Comment #27
andypostChasing 6-dev
Comment #28
hass commentedCode applies cleanly, Codewise also good and tested on dev machine with all core modules enabled.
Comment #29
gábor hojtsyCommitted to Drupal 6, thanks!
Also updated docs at http://drupal.org/node/322731 to say:
Comment #30
kkaefer commentedYay! This was really frustrating to translate.
Comment #32
quicksketchWe need to update more documentation on this. All the examples of hook_schema still include this code.
http://api.drupal.org/api/function/hook_schema
http://drupal.org/node/146843
Comment #33
john morahan commentedI changed http://drupal.org/node/146862 - didn't find any other examples of descriptions in that section of the handbook.
http://api.drupal.org/api/function/hook_schema is still wrong, including the D7 version
Comment #34
quicksketchCould we get this committed to HEAD? Then we can do the same to the D6 version (which is still in contrib, so I can get it).
Comment #35
webchickCommitted. Thanks!
Comment #36
webchickOr, well.
Comment #37
quicksketchFixed in D6 http://drupal.org/cvs?commit=214280
Thanks webchick!