@@ -381,7 +381,7 @@ protected function saveTranslations(): bool
381381 return $ saved ;
382382 }
383383
384- private function getAttributeAndLocale (string $ key ): array
384+ protected function getAttributeAndLocale (string $ key ): array
385385 {
386386 if (Str::contains ($ key , ': ' )) {
387387 return explode (': ' , $ key );
@@ -390,7 +390,7 @@ private function getAttributeAndLocale(string $key): array
390390 return [$ key , $ this ->locale ()];
391391 }
392392
393- private function getAttributeOrFallback (?string $ locale , string $ attribute )
393+ protected function getAttributeOrFallback (?string $ locale , string $ attribute )
394394 {
395395 $ translation = $ this ->getTranslation ($ locale );
396396
@@ -411,7 +411,7 @@ private function getAttributeOrFallback(?string $locale, string $attribute)
411411 return null ;
412412 }
413413
414- private function getFallbackLocale (?string $ locale = null ): ?string
414+ protected function getFallbackLocale (?string $ locale = null ): ?string
415415 {
416416 if ($ locale && $ this ->getLocalesHelper ()->isLocaleCountryBased ($ locale )) {
417417 if ($ fallback = $ this ->getLocalesHelper ()->getLanguageFromCountryBasedLocale ($ locale )) {
@@ -422,7 +422,7 @@ private function getFallbackLocale(?string $locale = null): ?string
422422 return config ('translatable.fallback_locale ' );
423423 }
424424
425- private function getTranslationByLocaleKey (string $ key ): ?Model
425+ protected function getTranslationByLocaleKey (string $ key ): ?Model
426426 {
427427 if (
428428 $ this ->relationLoaded ('translation ' )
@@ -435,12 +435,12 @@ private function getTranslationByLocaleKey(string $key): ?Model
435435 return $ this ->translations ->firstWhere ($ this ->getLocaleKey (), $ key );
436436 }
437437
438- private function toArrayAlwaysLoadsTranslations (): bool
438+ protected function toArrayAlwaysLoadsTranslations (): bool
439439 {
440440 return config ('translatable.to_array_always_loads_translations ' , true );
441441 }
442442
443- private function useFallback (): bool
443+ protected function useFallback (): bool
444444 {
445445 if (isset ($ this ->useTranslationFallback ) && is_bool ($ this ->useTranslationFallback )) {
446446 return $ this ->useTranslationFallback ;
@@ -449,7 +449,7 @@ private function useFallback(): bool
449449 return (bool ) config ('translatable.use_fallback ' );
450450 }
451451
452- private function usePropertyFallback (): bool
452+ protected function usePropertyFallback (): bool
453453 {
454454 return $ this ->useFallback () && config ('translatable.use_property_fallback ' , false );
455455 }
0 commit comments