Community
Participate
Working Groups
Since we now record the plugin_id for properties file, some have blank values because they were deleted or are not anymore mapped to babel with a map file. Two or three solutions: 1. Just don't generate for those files. 2. Remove them from the DB. 3. Flag those files as non existing during the processing and avoid generating for them.
Workaround for now: for those files we rely on the old way of finding the plugin id. I will bring the discussion to the babel-dev mailing list.
I vote 3. I'm raising priority here, because our database is full of 'deleted' files, and this could cause our translators to work for nothing.
Created attachment 118201 [details] Patch that fixes #3 Denis or Kit, please take a look at the attached patch.
Changing state to assigned.
cc'ing Margaret
The patch looks good, but I haven't tested it on my dev box. I believe we have an event log PHP class that could probably be used to log file additions and deletions, so we can track when these occurred. What do you think? I don't have any strong opinions about it. Otherwise, +1
+1
callback/getFilesForProject.php was also missing: AND f.is_active = 1 So all files, even inactive ones, currently show up in the UI for translation. I've fixed this on staging.
The maps processor seems to be removing dead files (as of the revision in the repo) properly. I just need to make sure the files are not available for translation in the UI.
I think we're done here. I marked a bunch of files as is_active = 0 and they don't show up in the UI, and Antoine has changed the maps processor to mark dead files as inactive. +1 for closing this FIXED.
I'll also add this trigger, to automatically update the is_active status of strings when we update the is_active status of a file: SET @OLD_SQL_MODE=@@SQL_MODE; DELIMITER ;; /*!50003 SET SESSION SQL_MODE="" */;; DROP TRIGGER IF EXISTS `upd_is_active`;; /* This trigger will recursively update the is_active status of the strings of a file */ CREATE TRIGGER `upd_is_active` AFTER UPDATE ON `files` FOR EACH ROW BEGIN UPDATE strings set is_active = NEW.is_active WHERE strings.file_id = NEW.file_id; END; ;; DELIMITER ; /*!50003 SET SESSION SQL_MODE=@OLD_SQL_MODE */;
Closing as FIXED, and the trigger is running on both the live and staging DB.